From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uCvmOgAWsWFrCQAAgWs5BA (envelope-from ) for ; Wed, 08 Dec 2021 21:30:56 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id QEmpNgAWsWH6IQAAB5/wlQ (envelope-from ) for ; Wed, 08 Dec 2021 20:30:56 +0000 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 aspmx1.migadu.com (Postfix) with ESMTPS id 9B7378FD3 for ; Wed, 8 Dec 2021 21:30:56 +0100 (CET) Received: from localhost ([::1]:46814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mv3aZ-00081C-Nj for larch@yhetil.org; Wed, 08 Dec 2021 15:30:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mv3Zz-0006lB-L3 for guix-patches@gnu.org; Wed, 08 Dec 2021 15:30:19 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:58374) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mv3Zv-0000Rh-Dd for guix-patches@gnu.org; Wed, 08 Dec 2021 15:30:19 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mv3Zv-00061q-Aj for guix-patches@gnu.org; Wed, 08 Dec 2021 15:30:15 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v3 30/43] gnu: Add node-file-uri-to-path. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 08 Dec 2021 20:30:15 +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 Received: via spool by 51838-submit@debbugs.gnu.org id=B51838.163899539322852 (code B ref 51838); Wed, 08 Dec 2021 20:30:15 +0000 Received: (at 51838) by debbugs.gnu.org; 8 Dec 2021 20:29:53 +0000 Received: from localhost ([127.0.0.1]:41635 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mv3ZY-0005wP-S3 for submit@debbugs.gnu.org; Wed, 08 Dec 2021 15:29:53 -0500 Received: from mail-vk1-f169.google.com ([209.85.221.169]:33691) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mv3Yz-0005rH-Fl for 51838@debbugs.gnu.org; Wed, 08 Dec 2021 15:29:18 -0500 Received: by mail-vk1-f169.google.com with SMTP id h1so2404819vkh.0 for <51838@debbugs.gnu.org>; Wed, 08 Dec 2021 12:29:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=zntKBevc+BpGMMLzowBbj8/sAZVsqLJiuuD9PDNx5oA=; b=FHCu5ndbwBcH2S8Dmdrzo11pfuvBqcCAJX37i6FDMK1ys3DSYthDzYReh9SvLMvRvn 3tj6Bjflu6Lg7USE99Nz7ZGafizKlap/wWERlR+DoWXoIzCq93WO3zno6qd+u7UMtcKJ DejKiAJSni3KaDDgsP6ZgNWXvdpuB6mNzqWM5Ozn7as2fmPrw+E6TfMXQ3xFOJ3hcH7g +LmJgABcskKg1ZgitjxFqrdEUZ4oxn28AX5cpCTyU1tlp3M7cuI8POlxrgDb/WUwiEC9 k5lM5ikrKhG+5TRrX0sHSZZjPwL+5oahqpsSXVVfJimB1jXhp3GBiwggIpxxwACMA08k i7dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zntKBevc+BpGMMLzowBbj8/sAZVsqLJiuuD9PDNx5oA=; b=7A/WaP++pwq2S2MAeni8cwo64lVaA1G/0MZBCn4UOtuMvw6pTDZOvp3YxfEET+ZXdU PKHZwkyMyzo1PJ0v+0hHkiduat+PdKG8n+SYZyA6pgpa65hcYnDJCbIGoX50BhnmWkLn 0/WoXl3Pec2pk59rXYv9V76pRKOJ0vHYME4pR/hxbnDvcwRBl9fII79+dRLmHQzNS0HW YBXtBF3r4WQu0Iv4B2SuQ32xIVhPAwYIvE5pq3vivjg4Fr5gfoC+QwKvIoEafqIS3ank Ske/wQ0hl2uyc5FFCTttV6wIv5QlX7MwkzaTqYWhPyzgQfFsQY/ZLe8Z5VYK50T+eFN6 qY+A== X-Gm-Message-State: AOAM530X1jz5UYen0/j/IaVaFNjVvf/VquRc/qKAGFuJAjA8X2z38R5d opm4gWv95Wu4tTFyLs+0W439IQaGtVjX5gakCfM= X-Google-Smtp-Source: ABdhPJyRB9ETQWbyrW2K6A6QqqCXnL4Q3lGuz6RALPgWNc2G5G2cJgNJC/fhuEKNmOkaaR9XFwKQlA== X-Received: by 2002:a1f:ee07:: with SMTP id m7mr1182795vkh.27.1638995351945; Wed, 08 Dec 2021 12:29:11 -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 r13sm2427218vkl.13.2021.12.08.12.29.11 for <51838@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Dec 2021 12:29:11 -0800 (PST) From: Philip McGrath Date: Wed, 8 Dec 2021 15:28:25 -0500 Message-Id: <20211208202838.752542-31-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211208202838.752542-1-philip@philipmcgrath.com> References: <46a042bc08eb72a068b1e8c69bfe28cf2d4b2e53.camel@gmail.com> <20211208202838.752542-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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1638995456; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=zntKBevc+BpGMMLzowBbj8/sAZVsqLJiuuD9PDNx5oA=; b=C8YQkgdwshNMVGsyERT7vz10+EgeZxspFLj0lc1bqhkYqt5hwX3DlSwmRuKsikhydGdkmK 0V60ss2IlmwSidbmAhRGtWfTAO7cCw7V+Q39OAnm3lSz9tGCJh7BCX4B5g/v/prU0zjlGn rbAAr1SjnF1drocVU8UBJY3LJz+TdBNdIQxVdoLGIpkEWw3oqNj+iHsaNIy8pEEpyx5/7W R+qOWHE2GGve0ndbctIP+ruAOLyUgx5DiI1A0KE8KXtKELhMfUKgxa1JAT3Uoen5fv+rVO qEPfsGmPbKFPsflSWx2adNnJrYVM5oRY+ai2UmjJF7jLvJQenNWqUm1FcxRA5g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638995456; a=rsa-sha256; cv=none; b=AHVAQJBNPgo+QJ1DXnAayE+1h9yMyxNEsuoLwhhJ9q8NDsYtD97f/pYlWfEGUd/64wGuG0 0IMAxXIKlf+hFu9v9VVfpL55SyGZky8tb1JKK6UTHdO99/W6NTRQzlwCcHfc0FPwq8etrE WGdTlmPNWKbs5y6WfsAdwGxLMDk/S5oIyR1JZ+RDdLwxYCjm1/olGXoVuqnCUu8+3c4nRD FOBp3XpwfEl1Za8avB9pW0SN65dGn3G2x4r3QMKCNeIA0J0YDhg00mkZpVomYZw7gvV7Fk mvxu55Wy5beMloVq64vSXaFegsytD4pARYke+KyueD2Yw9WPe9X6BOlFztaDpA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=FHCu5ndb; dmarc=none; spf=pass (aspmx1.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.45 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=FHCu5ndb; dmarc=none; spf=pass (aspmx1.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: 9B7378FD3 X-Spam-Score: -0.45 X-Migadu-Scanner: scn1.migadu.com X-TUID: FKU0+E0lbGdr * 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 b979d0cd53..d23326fa25 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) @@ -772,3 +773,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 + `(("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 "Accepts a @code{file:} URI and returns a regular file path +suitable for use with the @code{fs} module functions.") + (license license:expat))) -- 2.32.0