mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
gnu: Add node-minipass-7.
* gnu/packages/node-xyz.scm (node-minipass-7): New variable. Change-Id: I9a7fa292a8117795959a3f45cb300d9e07fd6a45 Signed-off-by: Andreas Enge <andreas@enge.fr>
This commit is contained in:
committed by
Andreas Enge
parent
aae52b37be
commit
6649e34002
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user