From patchwork Thu Dec 30 07:44:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 35832 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 BC18B27BBEB; Thu, 30 Dec 2021 07:52:22 +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 40C9F27BBE9 for ; Thu, 30 Dec 2021 07:52:22 +0000 (GMT) Received: from localhost ([::1]:39530 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n2qEX-0001Pu-Cj for patchwork@mira.cbaines.net; Thu, 30 Dec 2021 02:52:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2qEF-0000tL-FH for guix-patches@gnu.org; Thu, 30 Dec 2021 02:52:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39722) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n2qEE-0007CD-Jo for guix-patches@gnu.org; Thu, 30 Dec 2021 02:52:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n2qEE-0007EH-JN for guix-patches@gnu.org; Thu, 30 Dec 2021 02:52:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v7 26/41] gnu: Add node-file-uri-to-path. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 30 Dec 2021 07:52:02 +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.164085068427625 (code B ref 51838); Thu, 30 Dec 2021 07:52:02 +0000 Received: (at 51838) by debbugs.gnu.org; 30 Dec 2021 07:51:24 +0000 Received: from localhost ([127.0.0.1]:51240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2qDc-0007BO-7Z for submit@debbugs.gnu.org; Thu, 30 Dec 2021 02:51:24 -0500 Received: from mail-ua1-f51.google.com ([209.85.222.51]:38871) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2q9r-0006w7-US for 51838@debbugs.gnu.org; Thu, 30 Dec 2021 02:47:32 -0500 Received: by mail-ua1-f51.google.com with SMTP id o63so41275371uao.5 for <51838@debbugs.gnu.org>; Wed, 29 Dec 2021 23:47:31 -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=x87fGZu/A1sT6pAhEz8cYccU/ZtTtsUgyCHpXRR3jmI=; b=kjHAirIaCOeYM46l4PSX05W8ITM+heA+wocYSCc0Iv1Bh4Evet4/nemWPycNMEBASB 2CGuMhAMjAbA83RikHA0fRmJ8EqJSA5YrY0pzVFErfXKt1+zlqO7DU39bpVa9Z+LdLPz JLLRBa0VLHyz1i/r+tlcXHaiq/etxS7Wh9iiQuZI07hZMhNnvpxgQX3K5ma1Md0Dh8tF AEWlEf/mwc8xp2yWz3EUyWScI3cy1WcbMckC7myvwLWaSJK1i4Hic2Lfw8RiJmUrthDy v7UeM2MflvnisvnjTAeGXaqpi2yzjF03jbClYkavljOO7+seV+KomSoXFG61oe1hAxrb fMDA== 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=x87fGZu/A1sT6pAhEz8cYccU/ZtTtsUgyCHpXRR3jmI=; b=Ak6Ugcy1GbGNeQiCTZYwxEWpF6btYCqTwpZ+Ky5mfB137/I2n1INEC2TNEVdmUrMq/ 78YwN/w2WF2YBbEK9itkDFOVz3kBpDQatDx3PL8n8oT12E1dEEpqxPM3bAIZ3X1aCvw5 OaN80YawulcnQZWCsDXl2LXRgnLiZ68F4SjS3boa/YKGXR0xkgfZSP9IQp4WN2PmwRAd IY+rNPI8m2JQ5Ee8uRoagW/EX1aTh3+YwJVgcjvxxw4TDYy6jTIX0X5//BN7Xl2uyXor +h5rTG3+rGp9S6tIC6+MSO7RzKhk3HEC5oVUWy6Gqry8dNJ38htigmtFD/EjQCmmWCDF 45zg== X-Gm-Message-State: AOAM531JFfucNzhZZcjzAkfChcaPJKg7Elf6RDV7t8k95AIzELy9gAUE anUab1X/zSZ+aiZ6txlGyBNun/q1tEzw38Ei X-Google-Smtp-Source: ABdhPJy99N+0wjVgVTI52l8jKUQQ6Ck97JwiodxZwRhQQbweoTH7vbfms761RdCkH+3UpIt1ZPq9nA== X-Received: by 2002:a67:6f04:: with SMTP id k4mr8615645vsc.27.1640850446513; Wed, 29 Dec 2021 23:47:26 -0800 (PST) Received: from localhost (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with UTF8SMTPSA id g124sm3165766vkh.55.2021.12.29.23.47.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Dec 2021 23:47:26 -0800 (PST) From: Philip McGrath Date: Thu, 30 Dec 2021 02:44:41 -0500 Message-Id: <20211230074456.33433-27-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211230074456.33433-1-philip@philipmcgrath.com> References: <20211230073919.30327-1-philip@philipmcgrath.com> <20211230074456.33433-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 | 54 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm index d525da8dc3..6aeb651c4e 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) @@ -799,3 +800,56 @@ (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 (search-input-file (or native-inputs inputs) + "/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)))