[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#51838] [PATCH v8 26/41] gnu: Add node-file-uri-to-path.
From: |
Liliana Marie Prikler |
Subject: |
[bug#51838] [PATCH v8 26/41] gnu: Add node-file-uri-to-path. |
Date: |
Thu, 30 Dec 2021 02:39:04 -0500 |
* gnu/packages/node-xyz.scm (node-file-uri-to-path): New variable.
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
---
gnu/packages/node-xyz.scm | 46 +++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index c22291f66a..d3dc7c0b2b 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)
@@ -817,3 +818,48 @@ (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"
+ "^cpy-cli$"
+ "^mocha$" "^rimraf$"))))
+ (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.34.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug#51838] [PATCH v8 26/41] gnu: Add node-file-uri-to-path.,
Liliana Marie Prikler <=