From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 KDmbK7FjzWEIzAAAgWs5BA (envelope-from ) for ; Thu, 30 Dec 2021 08:45:53 +0100 Received: from aspmx2.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id UK3eKLFjzWHgkQAA9RJhRA (envelope-from ) for ; Thu, 30 Dec 2021 08:45:53 +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 0DD5C1EAC0 for ; Thu, 30 Dec 2021 08:45:52 +0100 (CET) Received: from localhost ([::1]:58514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n2q8F-0002vZ-Tn for larch@yhetil.org; Thu, 30 Dec 2021 02:45:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2q6Y-0001Ap-TO for guix-patches@gnu.org; Thu, 30 Dec 2021 02:44:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39542) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n2q6Y-0001o8-JG for guix-patches@gnu.org; Thu, 30 Dec 2021 02:44:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n2q6Y-0006jS-IA for guix-patches@gnu.org; Thu, 30 Dec 2021 02:44:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v6 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:44:06 +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.164085020425645 (code B ref 51838); Thu, 30 Dec 2021 07:44:06 +0000 Received: (at 51838) by debbugs.gnu.org; 30 Dec 2021 07:43:24 +0000 Received: from localhost ([127.0.0.1]:51053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2q5s-0006fS-4z for submit@debbugs.gnu.org; Thu, 30 Dec 2021 02:43:24 -0500 Received: from mail-qv1-f52.google.com ([209.85.219.52]:37532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2q53-0006bR-86 for 51838@debbugs.gnu.org; Thu, 30 Dec 2021 02:42:33 -0500 Received: by mail-qv1-f52.google.com with SMTP id fo11so21389887qvb.4 for <51838@debbugs.gnu.org>; Wed, 29 Dec 2021 23:42:33 -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=m4ey9PAs1l0oX379xrQCflc4IPx1npXrYzxZmle5J0A=; b=UPIsytVSQUUE6wZQO9YxRrMzk46bShYtMbmFrkBUqGE5k2zEEdX+y0T1MYzrnipA5b 9G04MohbNs+8eDNVRE793NyCB7380y2DOjUjjArzpuNb30Lm+aQcX9NS8fkTjHzBBrlu gyOvI/KuRYDlcNitB0nUbJo+LiD3FeJylqaQjb5B2i8gp+dCmhwvj3AiQJ4xs8LZLxEa R6YNwTMfKQlgLgIpd1oN5DfaLwMEGwWTonKVwnK4VtkiHIIOPobq7hKJ7hF5mEbSVuxm 0vPGv+8PvswqNkID3NXE0yq9/ox4bnQ3be0ndBlOQ07kFed/c8l2pu1qtGbBKj0PtXII RVcA== 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=m4ey9PAs1l0oX379xrQCflc4IPx1npXrYzxZmle5J0A=; b=EJLPvGsTILZlhw5PYIl5Uax1wyA5op/fhpQQ/bkKEoxPx3BWtygucAMt27cs+D4QAd Dz+8t4DIf51wUb2AvsGYsTITbhbEVI+W80R2un6lkmTnzI4XT/LrlcRS7b8pzAbjBvyd ucv9oG5gad/sKVVmfwilFpXvRDwl76HSNonMTojztV1khy4evHtqGAhwsJUlkPyj1ljx ymR9ajP5PayGDKkAWRc66cC8GFsBbiAmKtaQmoFEnTCLwukGuV9HiNMYgq1xBrsTYVZK H7o8ULEugusvlkA2HqtyfxCgUlvOexfK9fWO3bHsGcmDEzU1ESUn/ex/wgQRUUAQdjIs oygg== X-Gm-Message-State: AOAM530ozBdD1PQJMXnMdK+bGLGsUpl2E2fOjuXB2iQYBepOOYD9VHk7 e5/mfVDhWatsedUHIDKnyI6mT8PsweF+xK/J X-Google-Smtp-Source: ABdhPJw1dO/dYaR9luzmZiA5g+CYCjGnXd3gC0doqgx982s/63R5shkuymv6Q6bX8nuiXOT89kfwdw== X-Received: by 2002:ad4:5bcc:: with SMTP id t12mr14324657qvt.41.1640850147737; Wed, 29 Dec 2021 23:42:27 -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 x17sm20047439qta.66.2021.12.29.23.42.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Dec 2021 23:42:27 -0800 (PST) From: Philip McGrath Date: Thu, 30 Dec 2021 02:39:04 -0500 Message-Id: <20211230073919.30327-27-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211230073919.30327-1-philip@philipmcgrath.com> References: <082a81964a43ae5f735ad2ca433d0dfe00859c35.camel@gmail.com> <20211230073919.30327-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=1640850353; 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=m4ey9PAs1l0oX379xrQCflc4IPx1npXrYzxZmle5J0A=; b=A1UFEBIc7XIio+drYvv81wAc9+pxnWBTNVumTYunI4m/1QqB7aPjxjv8/qnYao5K4/KcLQ XSBT3BycbCcPZM7dql+POidRIdvVtbnCU7uxazOW5vFIfRCJaYiWADMevQtf6DaID5wwc3 fbItLTjjBOm7jw++m/8SAurVBj1ystCFx48qvk6KtD7DJ5J31ZKQWA3iDeoTQcpMTRRY7g umhPplSMLKI33+6moqklXNtKcSVVgjSczbOh5+sw4apNiw5s93z0hSAi8LJwxqITiAaqtC lCpcpBAXyoksxlq56GUaYgqNOxarZGxedPDNDYIC/DOmQt4aO4f1GFC2bcmH/g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640850353; a=rsa-sha256; cv=none; b=SB3LZ8WumNU3LoOzHeJlaYxIju3v7XTamLfUs2q3FLYKHIlnNiQLyZslcINb6o5KtG9dga waovIO9rFkL7vJSy5PmsaWZPI38B4zzspHfv0T6u5iee/oG6+gDM5/vhjTdKV0wd4jgs8x ajnvuL6S8ZWowxYQ0T/+waMU6Td4+n2G3CfruBFagSevOq6i/r3kxAvxuWYofxe1pE9jRu Ln68HonFxgnk7MNxHGThXl/akUNsAXtxURWP/WofUMfL811HZFdzA6XM9ezBRLegm9ptYP VS8PrMpk/te43v4L5nh/ZWysCLKX+PwJWv0BgYM/+PbWymJQnwsVQu+KJV9/5g== ARC-Authentication-Results: i=1; aspmx2.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=UPIsytVS; 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.93 Authentication-Results: aspmx2.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=UPIsytVS; 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: 0DD5C1EAC0 X-Spam-Score: 0.93 X-Migadu-Scanner: scn1.migadu.com X-TUID: A+ZSt3Y4zuRD * gnu/packages/node-xyz.scm (node-file-uri-to-path): New variable. --- gnu/packages/node-xyz.scm | 58 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm index 23ed209fd1..ef190e56c1 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) @@ -862,3 +863,60 @@ (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 + (with-atomic-json-file-replacement "package.json" + (lambda (pkg-meta) + (delete-dependencies pkg-meta + `("@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