diff options
| author | Jelle Licht <jlicht@fsfe.org> | 2025-11-01 12:25:43 +0100 |
|---|---|---|
| committer | Andreas Enge <andreas@enge.fr> | 2026-07-08 18:33:26 +0200 |
| commit | b9d47e0cca5cc3041974d59c3a2be99a1e894b3f (patch) | |
| tree | 4a79db08c3010a31380460057022d3b9543013b2 /gnu/packages/node.scm | |
| parent | 7006c79f2c296d13c603ea46050e00bf7a04667a (diff) | |
gnu: node-lts: Update to 24.11.0.
* gnu/packages/node.scm (node-lts): Update to 24.11.0.
[arguments]<#:phases>: Adjust 'ignore-number-of-hardlinks phase to patch both
ESM and CJS modules. Remove deprecated 'install-node-gyp-wrapper phase.
Introduce new replacement for 'fix-node-gyp-references phase.
Change-Id: I1a372ceb10e31ecfedeff7653030708efa97dab9
Diffstat (limited to 'gnu/packages/node.scm')
| -rw-r--r-- | gnu/packages/node.scm | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index 00c8c00aa80..9f04670a873 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm | |||
| @@ -748,14 +748,14 @@ source files.") | |||
| 748 | (define-public node-lts | 748 | (define-public node-lts |
| 749 | (package | 749 | (package |
| 750 | (inherit node-bootstrap) | 750 | (inherit node-bootstrap) |
| 751 | (version "24.9.0") | 751 | (version "24.11.0") |
| 752 | (source (origin | 752 | (source (origin |
| 753 | (method url-fetch) | 753 | (method url-fetch) |
| 754 | (uri (string-append "https://nodejs.org/dist/v" version | 754 | (uri (string-append "https://nodejs.org/dist/v" version |
| 755 | "/node-v" version ".tar.gz")) | 755 | "/node-v" version ".tar.gz")) |
| 756 | (sha256 | 756 | (sha256 |
| 757 | (base32 | 757 | (base32 |
| 758 | "0q34zr3wb9m54033ghr9shyp611yvmmaz9klfvc5xc3w6y48v1iw")) | 758 | "07xprlib8n1x55sxpnvycimhq86ch0pna5v8i712ddas1jsxsyrg")) |
| 759 | (modules '((guix build utils))) | 759 | (modules '((guix build utils))) |
| 760 | (snippet | 760 | (snippet |
| 761 | '(begin | 761 | '(begin |
| @@ -931,30 +931,22 @@ source files.") | |||
| 931 | ;; https://github.com/npm/pacote/issues/285 | 931 | ;; https://github.com/npm/pacote/issues/285 |
| 932 | (add-after 'install 'ignore-number-of-hardlinks | 932 | (add-after 'install 'ignore-number-of-hardlinks |
| 933 | (lambda* (#:key outputs #:allow-other-keys) | 933 | (lambda* (#:key outputs #:allow-other-keys) |
| 934 | (let ((file (string-append (assoc-ref outputs "out") | 934 | (let ((dir (string-append (assoc-ref outputs "out") |
| 935 | "/lib/node_modules/npm/node_modules" | 935 | "/lib/node_modules/npm/node_modules" |
| 936 | "/tar/lib/write-entry.js"))) | 936 | "/tar/dist"))) |
| 937 | (substitute* file | 937 | (substitute* |
| 938 | (list (string-append dir "/esm/write-entry.js") | ||
| 939 | (string-append dir "/commonjs/write-entry.js")) | ||
| 938 | (("this.stat.nlink > 1") "false"))))) | 940 | (("this.stat.nlink > 1") "false"))))) |
| 939 | (add-after 'install 'install-node-gyp-wrapper | 941 | (replace 'fix-node-gyp-reference |
| 940 | (lambda* (#:key inputs outputs #:allow-other-keys) | 942 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 941 | (let* ((out (assoc-ref outputs "out")) | 943 | (let ((out (assoc-ref outputs "out"))) |
| 942 | (dir (string-append out "/lib/node_modules/npm/bin/node-gyp-bin")) | 944 | (for-each |
| 943 | (file (string-append dir "/node-gyp"))) | 945 | (lambda (spec) |
| 944 | (mkdir-p dir) | 946 | (wrap-program (string-append out spec) |
| 945 | ;; See https://github.com/npm/cli/issues/6842 | 947 | `("npm_package_config_node_gyp_nodedir" = (,out)))) |
| 946 | (call-with-output-file file | 948 | '("/bin/npm" |
| 947 | (lambda (port) | 949 | "/bin/npx"))))))))) |
| 948 | (format port "#!~a/bin/sh | ||
| 949 | if [ \"x$npm_config_node_gyp\" = \"x\" ]; then | ||
| 950 | ~a/bin/node \"~a/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"$@\" | ||
| 951 | else | ||
| 952 | \"$npm_config_node_gyp\" \"$@\" | ||
| 953 | fi" | ||
| 954 | (assoc-ref inputs "bash") | ||
| 955 | out | ||
| 956 | out))) | ||
| 957 | (chmod file #o555)))))))) | ||
| 958 | (native-inputs | 950 | (native-inputs |
| 959 | (list ;; Runtime dependencies for binaries used as a bootstrap. | 951 | (list ;; Runtime dependencies for binaries used as a bootstrap. |
| 960 | c-ares-for-node-lts | 952 | c-ares-for-node-lts |
