diff options
| author | Daniel Khodabakhsh <d@niel.khodabakh.sh> | 2025-06-24 16:18:59 -0700 |
|---|---|---|
| committer | Andreas Enge <andreas@enge.fr> | 2026-01-27 10:39:45 +0100 |
| commit | aae52b37be56307b616f7fd42fa9fa7fe7be93a5 (patch) | |
| tree | 70de2336b4caef918aeec80b09be85144f10fbb6 /gnu | |
| parent | 6d11b2c0c0119f98817de4eb8e2a45de94cde2c8 (diff) | |
gnu: Add node-path-scurry.
* gnu/packages/node-xyz.scm (node-path-scurry): New variable.
Change-Id: I39598efc068bc706a481d121f6b0c5615a83effc
Signed-off-by: Andreas Enge <andreas@enge.fr>
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/node-xyz.scm | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm index ec94c34044d..9d9c5290284 100644 --- a/gnu/packages/node-xyz.scm +++ b/gnu/packages/node-xyz.scm @@ -1368,6 +1368,67 @@ parseMilliseconds(1337000001); particular cross-platform spellings of the PATH environment variable key.") (license license:expat))) +(define-public node-path-scurry + (package + (name "node-path-scurry") + (version "1.11.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/isaacs/path-scurry") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 (base32 "1vbmzg2pwmm441d9clk69fpij33ns5mblncy0za1x5f7d04jjyi2")))) + (build-system node-build-system) + (inputs (list + node-lru-cache + node-minipass-7)) + ; Use ESBuild because this is used to build Typescript. + (native-inputs (list esbuild)) + (arguments (list + #:modules '( + (guix build node-build-system) + (guix build utils) + (ice-9 match)) + #:tests? #f ; FIXME: Tests require 'tap'. + #:phases #~(modify-phases %standard-phases + (add-before 'patch-dependencies 'delete-dependencies + (lambda _ + (modify-json + (delete-dev-dependencies) + (delete-fields (list "scripts.prepare"))))) + (replace 'build + (lambda _ + (define output "output") + (for-each + (match-lambda ((format directory type) + (define target-output (string-append output "/dist/" directory)) + (invoke + "esbuild" + "src/*.ts" + "--platform=node" + "--target=es2022" + (string-append "--format=" format) + "--jsx=transform" + "--sourcemap" + (string-append "--outdir=" target-output)) + (with-output-to-file + (string-append target-output "/package.json") + (lambda _ (display (string-append "{\"type\": \"" type "\"}")))))) + (list + (list "cjs" "commonjs" "commonjs") + (list "esm" "esm" "module"))) + (for-each + (lambda (file) (install-file file output)) + (list "LICENSE.md" "package.json" "README.md")) + (chdir output)))))) + (synopsis "Yet another file traversal library.") + (description "Extremely high performant utility for building tools that read\ + the file system, minimizing filesystem and path string munging operations to\ + the greatest degree possible..") + (home-page (git-reference-url (origin-uri source))) + (license license:expat))) + (define-public node-pbf (package (name "node-pbf") |
