From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SBwRAxBrtmHUMgAAgWs5BA (envelope-from ) for ; Sun, 12 Dec 2021 22:35:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id YFFzOg9rtmFvZAAA1q6Kng (envelope-from ) for ; Sun, 12 Dec 2021 21:35:11 +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 3EAA5ACDF for ; Sun, 12 Dec 2021 22:35:11 +0100 (CET) Received: from localhost ([::1]:58676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mwWUw-000886-EX for larch@yhetil.org; Sun, 12 Dec 2021 16:35:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwWUo-00086u-Oi for guix-patches@gnu.org; Sun, 12 Dec 2021 16:35:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41795) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mwWUo-0001ZM-Ga for guix-patches@gnu.org; Sun, 12 Dec 2021 16:35:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mwWUo-0004Ee-FK for guix-patches@gnu.org; Sun, 12 Dec 2021 16:35:02 -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: Sun, 12 Dec 2021 21:35: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: Pierre Langlois Cc: 51838@debbugs.gnu.org X-Debbugs-Original-Cc: 51838@debbugs.gnu.org, guix-patches@gnu.org Received: via spool by 51838-submit@debbugs.gnu.org id=B51838.163934489016252 (code B ref 51838); Sun, 12 Dec 2021 21:35:02 +0000 Received: (at 51838) by debbugs.gnu.org; 12 Dec 2021 21:34:50 +0000 Received: from localhost ([127.0.0.1]:53340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwWUc-0004E3-IQ for submit@debbugs.gnu.org; Sun, 12 Dec 2021 16:34:50 -0500 Received: from mail-ua1-f50.google.com ([209.85.222.50]:40560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwWUY-0004Da-M6 for 51838@debbugs.gnu.org; Sun, 12 Dec 2021 16:34:47 -0500 Received: by mail-ua1-f50.google.com with SMTP id y5so26062304ual.7 for <51838@debbugs.gnu.org>; Sun, 12 Dec 2021 13:34:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=Ufownu7BKAZ0hKHgWgG8Dh0lnqluVU8DW510SIRT8Cw=; b=j1TqjrSBTak5zLUFheX94JfCprsgxah7EgtWRezeWUyZv2oF89vR0x2tD88jcHtUvw 9EkSM9kG/GgfIDMftHLj2jpyDX0etzN8+2mogVZqeP9VAPw1eS6JPJ6qqWs0r9MA6K6v JFKXV5D594qm8bhLdWhz/5uGz95yBvRz79kjzaPj34tFkpmOmhe6mXvW/hPSzHMaD26V spQriXW4N2lVK/bc/cFbGVJlP+Namooj7b0z89sVqQkGliCShy2VVigQZj6H4BGKcB+Y 7YjkPqoiV5B9gLUEMiyXmigzpmpRWgs184dIrVhuAMWNXQFvCs4aSPAMbgZDuw2xl08g Y6Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=Ufownu7BKAZ0hKHgWgG8Dh0lnqluVU8DW510SIRT8Cw=; b=jKGc5PrC+mN+BZmAA0eeq8bDHvV+seyHUnVITnr+zvvW7R6kV5j7tJT8u4bTLp+fzk AiLgcCN5lh1Xx+m1s01H+VX7w1LUPsIBguhkwkVymfbXTqk6O1kxFfnHlbRC7sdbqTpG ewJaXz8XpR97twjZW+a17UbALJ3RFyq8GRgY1i49mkglPRjrZ3ptwlsTZcQjkPO1enBy /E3vs2ACoX96vIly9WRdk6OgjEDfUUqS2S8YAj/9C3F+WB+nLzYBP1Tu7E3Kxj0KrIJP MwTx5LW4s13Gu1lJwJGbod3dUilhLDWY/mppV7B5AvO3YX1bq1NB6m0PLJ6Lxwz4Dr5N RDNQ== X-Gm-Message-State: AOAM5336hXEcG3M7QKYJ3dTd/Cv/OGbDlCp3Ih93EqvrwL+O0AeonXm6 e77kCMA+r/HFGnHfdFGHcZPEpq1AoQbYB9K2r6g= X-Google-Smtp-Source: ABdhPJzMNp9xe9D1Myn+hfHpGJLkPPxfNG8BgFCWCnbRDCciIMzuwDk/YTSF2mfCs4kMHhK27eRBRw== X-Received: by 2002:ab0:164d:: with SMTP id l13mr37985753uae.34.1639344881194; Sun, 12 Dec 2021 13:34:41 -0800 (PST) Received: from [192.168.45.37] (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id x21sm3770026ual.11.2021.12.12.13.34.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Dec 2021 13:34:41 -0800 (PST) Message-ID: <3ad58557-bc73-07bc-6af7-de7d0b424095@philipmcgrath.com> Date: Sun, 12 Dec 2021 16:34:40 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Content-Language: en-US References: <46a042bc08eb72a068b1e8c69bfe28cf2d4b2e53.camel@gmail.com> <20211208202838.752542-1-philip@philipmcgrath.com> <20211208202838.752542-31-philip@philipmcgrath.com> <87y24pwzww.fsf@gmx.com> From: Philip McGrath In-Reply-To: <87y24pwzww.fsf@gmx.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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=1639344911; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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=Ufownu7BKAZ0hKHgWgG8Dh0lnqluVU8DW510SIRT8Cw=; b=rO5nd5VJoj5csw5razinlXcOGB1sSKsBLYhsAvSrkTiNYPK2yZ9ouJvsy6LUng4RZfr+hr IHWOvto1OFJvHzMzhC22685cDsw6XxeQuzA3DrCWBkMwDmfcy8XopqB5URkFQ47iTOpXkH ILaeQRTKvKcgRWUDx2FlraOAflO7FD8sgBY74JSIS8pdA7mt2KIzqtoOI10iHQdMXviENG gZlOWOtpfZf+CP2DVdn+G+9JCwhsk2IKAVSzcCBHKUypCqOcyL+B979GWSfPMuguF+bEC/ wiQdkcIhOF0qRk4dssIR0MvEpRg4GoKI1EYVdX6K5sb4e5mppc2JkVjMq4luLw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639344911; a=rsa-sha256; cv=none; b=LuREjt8qUQ7Ihbg/sx+W6rj/OYs6hR9+WubBnEYMgtxg/CzbX6dNHDUGQDLbYWoJHPiw49 +3DsLGIqZx7T4oeqTMxCx166jrJ3POT6fUaXf5y7F373WZSk8Sc88ishZXWdJUcJ7og8Kj roa55Zap/tZ8FTZSjSkA/iLKYEDC36WHTtOu/dzomppIa18x14U3HAj/PuyCM9KOEIofps NGebIkDzC9qUwND0QPyUAvmsg4RJuigfzWkeEdTCMRbh5X9PnnrPURXPsCx43HXif1Pbxg qZQl61BGPbNFogTaku64DHQ8LeSeBaYHIT/cXXFHjYampNxAqiAenuRy31A8uA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=j1TqjrSB; 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: -1.97 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=j1TqjrSB; 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: 3EAA5ACDF X-Spam-Score: -1.97 X-Migadu-Scanner: scn1.migadu.com X-TUID: ArZL7l7dvl7p On 12/12/21 11:26, Pierre Langlois wrote: > > Philip McGrath writes: > >> * 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.") > > nit: We generally write description as full sentences, I'd suggest: > > --8<---------------cut here---------------start------------->8--- > This package provides a method to convert a @code{file:} URI to a file > path. It accepts a @code{file:} URI and returns a regular file path > suitable for use with the @code{fs} module functions. > --8<---------------cut here---------------end--------------->8--- Yes, I'll do something like that. -Philip