From patchwork Sat Jan 8 08:42:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 36148 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 7C65A27BBEA; Sat, 8 Jan 2022 08:57:20 +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 0F2D327BBE9 for ; Sat, 8 Jan 2022 08:57:20 +0000 (GMT) Received: from localhost ([::1]:36406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n67XL-0004rC-78 for patchwork@mira.cbaines.net; Sat, 08 Jan 2022 03:57:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45126) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n67MT-0003on-Mc for guix-patches@gnu.org; Sat, 08 Jan 2022 03:46:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:53501) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n67MT-0004d2-Dg for guix-patches@gnu.org; Sat, 08 Jan 2022 03:46:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n67MT-0000vh-Cb for guix-patches@gnu.org; Sat, 08 Jan 2022 03:46:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v9 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: Sat, 08 Jan 2022 08:46:05 +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 , Philip McGrath , Pierre Langlois , Liliana Marie Prikler , Leo Famulari , Jelle Licht Received: via spool by 51838-submit@debbugs.gnu.org id=B51838.16416315393394 (code B ref 51838); Sat, 08 Jan 2022 08:46:05 +0000 Received: (at 51838) by debbugs.gnu.org; 8 Jan 2022 08:45:39 +0000 Received: from localhost ([127.0.0.1]:46379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n67M3-0000sg-FK for submit@debbugs.gnu.org; Sat, 08 Jan 2022 03:45:39 -0500 Received: from mail-qk1-f174.google.com ([209.85.222.174]:35653) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n67M1-0000rt-Er for 51838@debbugs.gnu.org; Sat, 08 Jan 2022 03:45:37 -0500 Received: by mail-qk1-f174.google.com with SMTP id 131so8525003qkk.2 for <51838@debbugs.gnu.org>; Sat, 08 Jan 2022 00:45:37 -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=YTcgMXFqaAreTbqsLofqGGMJEb/QftU3tvE6conWoFM=; b=DZEAd2XNJzQLAZrW15lTtRfVuD9jVR81UNLtWKykjzuaZWSnDljyXUzrTRW+BGFbhs 7XLvohLwgOm+/Baox7+SJ3gil8ZRBrhlVRKjiiQpmifmV1XsM4ykqXEUCZud/Jswd5fe 7FVlWgih7Xa0ZPzqo7vw6bx4kvdKunmru0wbGCIw4KTRoR3Q293TX6QpG1xQMjn03Dty 3fcDQLo5be1f6yX4+T9AXV3akRDdFlbGMYNTapqFx6CUgj0DuKosz6MIMzSeyMi41ErQ qFidZMrNxKAv3ZvIi2jZ5Dy5wLYWuXWz/iCAWLv8bo9XPRPmpvbtAPR1EGdFdA6KKNar NeHQ== 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=YTcgMXFqaAreTbqsLofqGGMJEb/QftU3tvE6conWoFM=; b=gpGdYulJ28apevgFKJe9OJi+O/8Fn+b9S9MSaTzx8qD+jkkn5C9Z8Ei3xqT2ObU71B D/8FhN9mS5AwuU02htCxnehWXt/VtT2pg90czNRUP0iG1ion6gj+zmCKgjfnRF4jHVp/ F7334pJkgXL09sG7Y7vNIdA3hS2Um8BTMhRft46mneWkHQ8Z+QZYbCAZNJDZfkb/qNT5 FwHOHpgTz/8Yg/b+7ba0IgmnwJZBD/lF4Pq282wIYT0r/8B5GZuomJwrfmoUZ3LxnszR TcA7aZndUTZzD7GTGVyixZcBSexGOuwyYI5Y/atkNh0magKsWyfpMmg9hM6z7ALesiwO mC8A== X-Gm-Message-State: AOAM53076Y9uwQ8so0kKvMTUBInKxUG35F6qPQV393kiV8Q2fqYbGwUf 0Ny87T7c0C5jdn/Ar0Tz1jJ+MB8dI9ILho+N X-Google-Smtp-Source: ABdhPJxRvG/Za21/1Mde33DtqY7zoAptPjU4j3/1kIJRSQfJAzoBAumm32eMKAmLr19hbV7YxpIZZQ== X-Received: by 2002:a37:b944:: with SMTP id j65mr47090500qkf.708.1641631531930; Sat, 08 Jan 2022 00:45:31 -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 j20sm718182qko.117.2022.01.08.00.45.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 08 Jan 2022 00:45:31 -0800 (PST) From: Philip McGrath Date: Sat, 8 Jan 2022 03:42:14 -0500 Message-Id: <20220108084229.362642-27-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220108084229.362642-1-philip@philipmcgrath.com> References: <64e08d3a1838ed8507f33fae895545372960522f.camel@gmail.com> <7b04af28bbd57c67093ce8f33a648efec89693bd.camel@gmail.com> <441bfeb0-eb6e-81f6-488b-cdf1b09a78ef@philipmcgrath.com> <20220108084229.362642-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 9682582eec..c35ae10990 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) @@ -829,3 +830,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 + `(#:phases + (modify-phases %standard-phases + (add-after 'patch-dependencies 'delete-dependencies + (lambda args + (delete-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")))) + (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)))