From patchwork Mon Dec 13 06:00:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 35171 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C8D7A27BBEA; Mon, 13 Dec 2021 06:05:31 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 09B1C27BBE9 for ; Mon, 13 Dec 2021 06:05:31 +0000 (GMT) Received: from localhost ([::1]:43434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mweSo-0003k0-6w for patchwork@mira.cbaines.net; Mon, 13 Dec 2021 01:05:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mweSP-0003dv-CG for guix-patches@gnu.org; Mon, 13 Dec 2021 01:05:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:42272) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mweSP-0007Yo-1Y for guix-patches@gnu.org; Mon, 13 Dec 2021 01:05:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mweSO-0002dS-T8 for guix-patches@gnu.org; Mon, 13 Dec 2021 01:05:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v4 30/45] gnu: Add node-file-uri-to-path. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 13 Dec 2021 06:05:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51838 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51838@debbugs.gnu.org Cc: Timothy Sample , Pierre Langlois , Jelle Licht , Philip McGrath , Liliana Marie Prikler Received: via spool by 51838-submit@debbugs.gnu.org id=B51838.163937549510003 (code B ref 51838); Mon, 13 Dec 2021 06:05:04 +0000 Received: (at 51838) by debbugs.gnu.org; 13 Dec 2021 06:04:55 +0000 Received: from localhost ([127.0.0.1]:53794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mweSF-0002b7-Am for submit@debbugs.gnu.org; Mon, 13 Dec 2021 01:04:55 -0500 Received: from mail-vk1-f179.google.com ([209.85.221.179]:44944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mweRn-0002ZS-Un for 51838@debbugs.gnu.org; Mon, 13 Dec 2021 01:04:40 -0500 Received: by mail-vk1-f179.google.com with SMTP id u68so9670746vke.11 for <51838@debbugs.gnu.org>; Sun, 12 Dec 2021 22:04:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wuTOYhWFuCzBnnewEXtbvxybDm7Hg+tS8zFvFoCfClg=; b=RjDXsV0N2UhzEG2A+Y7cZ3DHfhVdlWgnWjZfXhSBqsLrpU6lJKsOmwg7+NWdb6DBnr AkyN5m0pLKXSq65CjZYLS+h4TGvRR9w6TMR2Fm/eAwvxv8r4ixcTPB+wwS2Vx7rkTeoN OttlaRjFHmW5ZnSWhWxv0s1vVVc/+JeA+Xv/HnAsg64e0l9OaMYUt3RPc8foyAylkHKZ RkG5fff3veZT6Ttan6su4N/yojEbiDKXsgIk6KeLg3RUFdJbSNw+lEClKnvG0KopmtK4 lKP6TQWebxvCYH7PV/LcvhsKKEkBnpCNdsZBaLExnqPVeApRQ56SRcQMhzY37Gch+nA+ lRRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wuTOYhWFuCzBnnewEXtbvxybDm7Hg+tS8zFvFoCfClg=; b=dIiFZBV3TQs93jHTOYQZAznCzopbK8Ys/cou43gew4LRp3DFAhe4W4cgaDT/0ndtrL 2uO5IYFZDhc5Kis0dD18kwMWyW7u1cD4Oxc5221cNH1OtW/8HMLwvHpzDyYhzD7K/9DK d2Kvey6RcFR1IWzfQMsvviZpzKHekRL+W0VV5Ba0QjwfnMpD/z15J0GN9/sDF0DX1UD7 BCoDFnaHRZNm8vaaolS1EjcKOwu7cxGjrSAIb94GWeE4d6j+Lj/GY0MbnTcVI+jCX+po zAqdJog1xlElgT3XJqA1bWcpqBr9ciudDQJtBJ8uf6Hp0fJ8Hl2/SrJXvOporyBKAesj vIuw== X-Gm-Message-State: AOAM533EzTe4/uvXrc+kIy9uWKrG5sf+1jAPKwI3SPknkHqvaTuK/Ohh TeH5FRQ7rxw8wffXmjl+o73p+LAWyUreIrZQYfc= X-Google-Smtp-Source: ABdhPJw56Ddj6Fmpp8YyeqtWUyzNzf1sW4EijBuLAfbpQUkzOWajSC1asVeATnaU7PT0xoqRpXfnWA== X-Received: by 2002:a05:6122:1782:: with SMTP id o2mr30373226vkf.3.1639375462566; Sun, 12 Dec 2021 22:04:22 -0800 (PST) Received: from localhost (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id j15sm3703933vsj.32.2021.12.12.22.04.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Dec 2021 22:04:22 -0800 (PST) From: Philip McGrath Date: Mon, 13 Dec 2021 01:00:52 -0500 Message-Id: <20211213060107.129223-31-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211213060107.129223-1-philip@philipmcgrath.com> References: <46a042bc08eb72a068b1e8c69bfe28cf2d4b2e53.camel@gmail.com> <20211208202838.752542-1-philip@philipmcgrath.com> <20211208202838.752542-5-philip@philipmcgrath.com> <877dc924h7.fsf@gmx.com> <5c62c3ce-dd50-5dcd-00ed-ff1524be4e0b@philipmcgrath.com> <20211213060107.129223-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/node-xyz.scm (node-file-uri-to-path): New variable. --- gnu/packages/node-xyz.scm | 55 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm index d1bb236186..bdfe71a1f3 100644 --- a/gnu/packages/node-xyz.scm +++ b/gnu/packages/node-xyz.scm @@ -24,6 +24,7 @@ (define-module (gnu packages node-xyz) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages sqlite) #:use-module (gnu packages python) + #:use-module (gnu packages web) #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix git-download) @@ -787,3 +788,57 @@ (define-public node-sqlite3 non-blocking bindings for SQLite3, written in modern C++ and tested for memory leaks.") (license license:bsd-3))) + +(define-public node-file-uri-to-path + (package + (name "node-file-uri-to-path") + (version "2.0.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/TooTallNate/file-uri-to-path") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "08l779az44czm12xdhgcrnzpqw34s59hbrlfphs7g9y2k26drqav")))) + (native-inputs + `(("esbuild" ,esbuild))) + (build-system node-build-system) + (arguments + `(#:absent-dependencies + `("@types/mocha" + "@types/node" + "@typescript-eslint/eslint-plugin" + "@typescript-eslint/parser" + "cpy-cli" + "eslint" + "eslint-config-airbnb" + "eslint-config-prettier" + "eslint-import-resolver-typescript" + "eslint-plugin-import" + "eslint-plugin-jsx-a11y" + "eslint-plugin-react" + "mocha" + "rimraf" + "typescript") + #:phases + (modify-phases %standard-phases + (replace 'build + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (copy-recursively "src" "dist") + (invoke (string-append + (assoc-ref (or native-inputs inputs) "esbuild") + "/bin/esbuild") + "dist/index.ts" + "--outfile=dist/src/index.js" + "--format=cjs" + "--sourcemap" + "--platform=node")))) + #:tests? #f)) + (home-page "https://github.com/TooTallNate/file-uri-to-path") + (synopsis "Convert a @code{file:} URI to a file path") + (description "This package provides a function to convert a @code{file:} +URI to a file path. It accepts a @code{file:} URI and returns a file path +suitable for use with the @code{fs} module functions.") + (license license:expat)))