guix_mirror_bot pushed a commit to branch master
in repository guix.
commit 6649e34002806b910ca8710bfe4c5e00ba60b695
Author: Daniel Khodabakhsh <[email protected]>
AuthorDate: Tue Jun 24 16:18:59 2025 -0700
gnu: Add node-minipass-7.
* gnu/packages/node-xyz.scm (node-minipass-7): New variable.
Change-Id: I9a7fa292a8117795959a3f45cb300d9e07fd6a45
Signed-off-by: Andreas Enge <[email protected]>
---
gnu/packages/node-xyz.scm | 52 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 9d9c529028..163df9167d 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1143,6 +1143,58 @@ This is not a through or through2 stream. It doesn't
transform the data, it just
(home-page (git-reference-url (origin-uri source)))
(license license:isc)))
+(define-public node-minipass-7
+ (package
+ (inherit node-minipass-5)
+ (version "7.1.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url (git-reference-url (origin-uri (package-source node-minipass-5))))
+ (commit (string-append "v" version))))
+ (file-name (git-file-name (package-name node-minipass-5) version))
+ (sha256 (base32
"0zqnnw9ibwm660md1pfqsiwbbpbizydiwjp4fr8niyzczxk66k1j"))))
+ ; 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 'modify-package
+ (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/index.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" "package.json" "README.md"))
+ (chdir output))))))))
+
(define-public node-ms
(package
(name "node-ms")