From patchwork Fri Dec 17 02:03:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 35314 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 929DC27BBEA; Fri, 17 Dec 2021 02:07:04 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, 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 1383927BBE9 for ; Fri, 17 Dec 2021 02:07:04 +0000 (GMT) Received: from localhost ([::1]:53502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1my2eF-0005FZ-7Y for patchwork@mira.cbaines.net; Thu, 16 Dec 2021 21:07:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55148) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1my2dO-0004RV-1J for guix-patches@gnu.org; Thu, 16 Dec 2021 21:06:10 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:54064) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1my2dN-000821-Mx for guix-patches@gnu.org; Thu, 16 Dec 2021 21:06:09 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1my2dN-0005DZ-Hh for guix-patches@gnu.org; Thu, 16 Dec 2021 21:06:09 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v5 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: Fri, 17 Dec 2021 02:06:09 +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.163970676219934 (code B ref 51838); Fri, 17 Dec 2021 02:06:09 +0000 Received: (at 51838) by debbugs.gnu.org; 17 Dec 2021 02:06:02 +0000 Received: from localhost ([127.0.0.1]:37359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1my2dG-0005BB-14 for submit@debbugs.gnu.org; Thu, 16 Dec 2021 21:06:02 -0500 Received: from mail-qt1-f170.google.com ([209.85.160.170]:38635) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1my2d8-00059w-Pn for 51838@debbugs.gnu.org; Thu, 16 Dec 2021 21:05:55 -0500 Received: by mail-qt1-f170.google.com with SMTP id 8so1200349qtx.5 for <51838@debbugs.gnu.org>; Thu, 16 Dec 2021 18:05:54 -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=TMEGHgjDqWvJ21ZVQG9fhDd/jUJbOW/c1B/jRRJdX8A=; b=iRav/mS3sI6POV+Tjv1aLY/XHH4vXklsHzOlTBK7jQnR19skdAH8NioV0DGD62Oglk rqOSmX6slm7dBWMQQfb/Gh//8ltVfxgK+r7CTm9cjfxEki0YsvCizxUBAy2sdiZELHBu RCrx38vIawhOj1EAcoX00uOMhxMdnhTMWb+WNKVZBcR9KdTRtNMa6pMQAQxxiHBUaKnm XjoDUdv1Cq5/hO345MCJIH+dCks7LR87CbFqI9GwyRMW+y2g3w91f+s7JGeSaOCxJ1Go yhiKv3rGuNF5+KWGLkM9vMQFP6ZPvmoektU610Zu5P6mCUofc1Gu7ZZhq33SDjVZUPjx n1pw== 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=TMEGHgjDqWvJ21ZVQG9fhDd/jUJbOW/c1B/jRRJdX8A=; b=JTH2WGY2qi7yQ6L5zNbVq1iNPkFNirj71EuNcKaa/hd/AVmv8m0DSq38Mfbv5jdBUC iSmvBe24hHaCnW8/V6K8zat8D4rN+xlBN/pAgMUpnXZznRO/2aevIY/J7pYwzqyzbD+j 9LcaeLjHUZI7fJnAoQWPJK2/QK5gCyhp81IuiOG8oKWo0MYUsz6rK8gj0pz4amBqtYA8 HlhRB/4jN0qu/QMc2C3K5aIP8FdRQyOcKNdOOe2njFSunLngxW0Zt4AO41AABu6RBpgt Xhq6NFFowQ/hY5Dg9iNV6HRmWuuaGW/3bM8EMn8gsBgDySOa8L4yTpBXv56ClXUvkfl9 HQ2Q== X-Gm-Message-State: AOAM533F7UspoKYq+xzqmcpeyI3VDgY68DPc+9VQEsBWWnjKlSfROWdj wY7y7+1iK7k5AjYbuI7ahJHeUMB0rUe9pgcHEOg= X-Google-Smtp-Source: ABdhPJxMvtZ7hnAZye0LILM5yULYJhcVx1QZ9WAPetgMAjIfG/Px3w9LoogAday05uz93UoPL2+lLw== X-Received: by 2002:ac8:5991:: with SMTP id e17mr713356qte.344.1639706749435; Thu, 16 Dec 2021 18:05:49 -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 br43sm3955646qkb.57.2021.12.16.18.05.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Dec 2021 18:05:49 -0800 (PST) From: Philip McGrath Date: Thu, 16 Dec 2021 21:03:10 -0500 Message-Id: <20211217020325.520821-31-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211217020325.520821-1-philip@philipmcgrath.com> References: <20211213060107.129223-1-philip@philipmcgrath.com> <20211217020325.520821-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 f5297c869b..c9afe8ccd2 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) @@ -780,3 +781,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 + (list 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)))