From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aPjhDfFR2WEVWgAAgWs5BA (envelope-from ) for ; Sat, 08 Jan 2022 09:57:21 +0100 Received: from aspmx2.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id wE2XCvFR2WFy6QAAauVa8A (envelope-from ) for ; Sat, 08 Jan 2022 09:57:21 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx2.migadu.com (Postfix) with ESMTPS id BEF143321B for ; Sat, 8 Jan 2022 09:57:20 +0100 (CET) Received: from localhost ([::1]:36406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n67XL-0004rC-UC for larch@yhetil.org; 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 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1641632240; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=YTcgMXFqaAreTbqsLofqGGMJEb/QftU3tvE6conWoFM=; b=SOn6b52pcHXWP7cMMRZWMlY58LqmmdUo+u3xaylzUaUGmTAwdPImWgxKEXxiJbdKsMMB05 1BzC3wDwPN9djDlT6OinWGc9h9fMuq9vEUTcR1geD5PY1GmkWNnl3RRYJRZRAB/LBTMern HRAJ8PtQdq3F+jyvuko3NIU7+U4WY5O35TeVJEM7VX3pT3LmfEDZ4b5I3A0ygZQeYz3e9i qu4bakgkHnHjcT5ahqfsKr+F8el9ELj6Wi/ZDju3h+BNSrt1iu3pJjaPqoUH6szm/1Ds9R oMTiOvgadAR6/LzkAsIfNnYtyXVgeh9z6bVu/eKiPk19YrqbRwKUe0PfrmPXAQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641632240; a=rsa-sha256; cv=none; b=UjfcGmtHdFnqQmPTW8Zi3GagxsSr+s4FfhDpSe3ATtiOUJ8REdmkC/yIc8Oh/1I4sfgg7F MDfQWbZ9fCCPwtCinIw7mvIWoxuOnm4z5hZUSotu5+TrYKhaM7j62hsciQPY/OUrXZQMGm 4h4YpXAQvXRXhhGewD3vm730ziv+yxZupmqYcaj2XPoqQPXr4HAsVjaOifyxKW+k/sjROn KOpaK4THL8zQtdGrGlXC0shM5s5hdjv59h8ibUzsosjrC23qWqqPqpL6VLg+kutQ3e/EUo DyjLVEzwJoblz+7weFb6vPu8+C0P9D8mIGFOl3GR2VQhyxZAsSBsdOWIedsRhQ== ARC-Authentication-Results: i=1; aspmx2.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=DZEAd2XN; dmarc=none; spf=pass (aspmx2.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 0.90 Authentication-Results: aspmx2.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=DZEAd2XN; dmarc=none; spf=pass (aspmx2.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: BEF143321B X-Spam-Score: 0.90 X-Migadu-Scanner: scn1.migadu.com X-TUID: F84CS7muvGUo * 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))) -- 2.32.0