From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ONQwCW1wzWGVEQEAgWs5BA (envelope-from ) for ; Thu, 30 Dec 2021 09:40:13 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id eOLLAW1wzWE5eQAAG6o9tA (envelope-from ) for ; Thu, 30 Dec 2021 09:40:13 +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 aspmx1.migadu.com (Postfix) with ESMTPS id 90EFB2977A for ; Thu, 30 Dec 2021 09:40:12 +0100 (CET) Received: from localhost ([::1]:39530 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n2qEU-0001Pu-PN for larch@yhetil.org; Thu, 30 Dec 2021 02:52:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2qEF-0000tL-FH for guix-patches@gnu.org; Thu, 30 Dec 2021 02:52:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39722) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n2qEE-0007CD-Jo for guix-patches@gnu.org; Thu, 30 Dec 2021 02:52:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n2qEE-0007EH-JN for guix-patches@gnu.org; Thu, 30 Dec 2021 02:52:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v7 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:52: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: 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.164085068427625 (code B ref 51838); Thu, 30 Dec 2021 07:52:02 +0000 Received: (at 51838) by debbugs.gnu.org; 30 Dec 2021 07:51:24 +0000 Received: from localhost ([127.0.0.1]:51240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2qDc-0007BO-7Z for submit@debbugs.gnu.org; Thu, 30 Dec 2021 02:51:24 -0500 Received: from mail-ua1-f51.google.com ([209.85.222.51]:38871) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2q9r-0006w7-US for 51838@debbugs.gnu.org; Thu, 30 Dec 2021 02:47:32 -0500 Received: by mail-ua1-f51.google.com with SMTP id o63so41275371uao.5 for <51838@debbugs.gnu.org>; Wed, 29 Dec 2021 23:47:31 -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=x87fGZu/A1sT6pAhEz8cYccU/ZtTtsUgyCHpXRR3jmI=; b=kjHAirIaCOeYM46l4PSX05W8ITM+heA+wocYSCc0Iv1Bh4Evet4/nemWPycNMEBASB 2CGuMhAMjAbA83RikHA0fRmJ8EqJSA5YrY0pzVFErfXKt1+zlqO7DU39bpVa9Z+LdLPz JLLRBa0VLHyz1i/r+tlcXHaiq/etxS7Wh9iiQuZI07hZMhNnvpxgQX3K5ma1Md0Dh8tF AEWlEf/mwc8xp2yWz3EUyWScI3cy1WcbMckC7myvwLWaSJK1i4Hic2Lfw8RiJmUrthDy v7UeM2MflvnisvnjTAeGXaqpi2yzjF03jbClYkavljOO7+seV+KomSoXFG61oe1hAxrb fMDA== 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=x87fGZu/A1sT6pAhEz8cYccU/ZtTtsUgyCHpXRR3jmI=; b=Ak6Ugcy1GbGNeQiCTZYwxEWpF6btYCqTwpZ+Ky5mfB137/I2n1INEC2TNEVdmUrMq/ 78YwN/w2WF2YBbEK9itkDFOVz3kBpDQatDx3PL8n8oT12E1dEEpqxPM3bAIZ3X1aCvw5 OaN80YawulcnQZWCsDXl2LXRgnLiZ68F4SjS3boa/YKGXR0xkgfZSP9IQp4WN2PmwRAd IY+rNPI8m2JQ5Ee8uRoagW/EX1aTh3+YwJVgcjvxxw4TDYy6jTIX0X5//BN7Xl2uyXor +h5rTG3+rGp9S6tIC6+MSO7RzKhk3HEC5oVUWy6Gqry8dNJ38htigmtFD/EjQCmmWCDF 45zg== X-Gm-Message-State: AOAM531JFfucNzhZZcjzAkfChcaPJKg7Elf6RDV7t8k95AIzELy9gAUE anUab1X/zSZ+aiZ6txlGyBNun/q1tEzw38Ei X-Google-Smtp-Source: ABdhPJy99N+0wjVgVTI52l8jKUQQ6Ck97JwiodxZwRhQQbweoTH7vbfms761RdCkH+3UpIt1ZPq9nA== X-Received: by 2002:a67:6f04:: with SMTP id k4mr8615645vsc.27.1640850446513; Wed, 29 Dec 2021 23:47:26 -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 g124sm3165766vkh.55.2021.12.29.23.47.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Dec 2021 23:47:26 -0800 (PST) From: Philip McGrath Date: Thu, 30 Dec 2021 02:44:41 -0500 Message-Id: <20211230074456.33433-27-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211230074456.33433-1-philip@philipmcgrath.com> References: <20211230073919.30327-1-philip@philipmcgrath.com> <20211230074456.33433-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=1640853612; 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=x87fGZu/A1sT6pAhEz8cYccU/ZtTtsUgyCHpXRR3jmI=; b=NL+wuDka67zXeA0i2i2RKJjqBI4yPY9wz5RQvIZCu7gRzCi5eCRF/8SqQ1wPJxMCSQWbvy J+uKlmQP4mLmETgQ+4Oye9vp+nRuhvkN43VyNkXVjgXiamxSV0s8rZoeIwnu3COeyamSnZ AuqDY5EiGFIkk6PejDn/YLxqvDkmMtQ34rOTSVPRDJDAtpQ/iCRvYdINQNB+B1p9czlwdc forUrgQzlXYWn8pjhnryf0zc7GAziJ8fgjzADBT8nQ6S77L8P5FZtEP//Ab7BXuHcu2LFX KBacmcQotcEnQGERnCgvVvwSGeaxynRJcOX9SJ76nHVcIraNGQ9y5XnuLD7ezw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640853612; a=rsa-sha256; cv=none; b=LyPr9smHAwIDnI78keLNT9YsWAjApD5Y8inmwBUWou/kVXNueMXg7zv4n56rSQnug7fVHy lT1j7bwgJMhXo9qZF98w+8h6BKakqBsQL/XQKJzZffXTDrsBY5K0+q0fH7N4OYWyuVeAGp Eemb8eNwrfySOVWWf2IPgd1uDd4MpayGWQJUPaDT71B3hMTUR9824SIFjmFPxmHuOl7Ziw RPaAZ/BQYSAta1uKUBeNlbCrcT5SCHFkonky0V08xkszvL0W+ZlnOPp8OnH7EeNvhCe+Eq LNAtu6eSB4NW1zJFI9v0aTRApDP1fwRTBXA1B7S5qOJJYdtfQGuZfWByA96fbA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=kjHAirIa; 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.63 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=kjHAirIa; 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: 90EFB2977A X-Spam-Score: 0.63 X-Migadu-Scanner: scn0.migadu.com X-TUID: cgcpL8PkaCpS * 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 d525da8dc3..6aeb651c4e 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) @@ -799,3 +800,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 + (list 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 (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