diff options
author | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2023-05-10 21:39:40 +0200 |
---|---|---|
committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2023-05-10 21:39:40 +0200 |
commit | 09dd600159801b3b8fd6b95bf69e648f9e37d959 (patch) | |
tree | c6961be106846628bf0d128586fc73685b895315 /gnu/packages/node.scm | |
parent | eab4d0e18a616c71ab5f3af7f2915a9591ef04e8 (diff) | |
parent | b4e5844700b2304bfde451322feb5797bf0c6179 (diff) |
Merge branch 'master' into gnome-team.
Diffstat (limited to 'gnu/packages/node.scm')
-rw-r--r-- | gnu/packages/node.scm | 57 |
1 files changed, 36 insertions, 21 deletions
diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index d8d40e8fb4..7695614b3a 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com> ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net> ;;; Copyright © 2021, 2022 Philip McGrath <philip@philipmcgrath.com> +;;; Copyright © 2022 Hilton Chain <hako@ultrarare.space> ;;; ;;; This file is part of GNU Guix. ;;; @@ -668,7 +669,7 @@ parser definition into a C output.") (define-public llhttp-bootstrap (package (name "llhttp") - (version "2.1.4") + (version "6.0.10") (source (origin (method git-fetch) (uri (git-reference @@ -677,8 +678,7 @@ parser definition into a C output.") (file-name (git-file-name name version)) (sha256 (base32 - "115mwyds9655p76lhglxg2blc1ksgrix6zhigaxnc2q6syy3pa6x")) - (patches (search-patches "llhttp-bootstrap-CVE-2020-8287.patch")) + "0izwqa77y007xdi0bj3ccw821n19rz89mz4hx4lg99fwkwylr6x8")) (modules '((guix build utils))) (snippet '(begin @@ -738,23 +738,28 @@ source files.") (define-public node-lts (package (inherit node) - (version "14.19.3") + (version "18.16.0") (source (origin (method url-fetch) (uri (string-append "https://nodejs.org/dist/v" version - "/node-v" version ".tar.xz")) + "/node-v" version ".tar.gz")) (sha256 (base32 - "15691j5zhiikyamiwwd7f282g6d9acfhq91nrwx54xya38gmpx2w")) + "0vcc132z7lkxnw5clmiz6sp6ccmw35pyb69hczphrig5frfmqkva")) (modules '((guix build utils))) (snippet `(begin + ;; openssl.cnf is required for build. + (for-each delete-file-recursively + (find-files "deps/openssl" + (lambda (file stat) + (if (string-contains file "nodejs-openssl.cnf") + #f #t)))) ;; Remove bundled software, where possible (for-each delete-file-recursively '("deps/cares" "deps/icu-small" "deps/nghttp2" - "deps/openssl" "deps/zlib")) (substitute* "Makefile" ;; Remove references to bundled software. @@ -770,7 +775,9 @@ source files.") "--shared-openssl" "--shared-zlib" "--shared-brotli" - "--with-intl=system-icu")) + "--with-intl=system-icu" + ;;Needed for correct snapshot checksums + "--v8-enable-snapshot-compression")) ((#:phases phases) `(modify-phases ,phases (replace 'set-bootstrap-host-rpath @@ -803,23 +810,31 @@ source files.") libuv "/lib:" zlib "/lib" "'],")))))) + (add-after 'patch-hardcoded-program-references + 'patch-additional-hardcoded-program-references + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "test/parallel/test-stdin-from-file-spawn.js" + (("'/bin/sh'") (string-append + "'" (search-input-file inputs "/bin/sh") + "'"))))) (replace 'delete-problematic-tests (lambda* (#:key inputs #:allow-other-keys) ;; FIXME: These tests fail in the build container, but they don't ;; seem to be indicative of real problems in practice. (for-each delete-file - '("test/parallel/test-cluster-master-error.js" - "test/parallel/test-cluster-master-kill.js")) + '("test/parallel/test-cluster-primary-error.js" + "test/parallel/test-cluster-primary-kill.js")) ;; These require a DNS resolver. (for-each delete-file '("test/parallel/test-dns.js" - "test/parallel/test-dns-lookupService-promises.js")) + "test/parallel/test-dns-lookupService-promises.js" + "test/parallel/test-net-socket-connect-without-cb.js" + "test/parallel/test-tcp-wrap-listen.js")) ;; These tests require networking. (for-each delete-file - '("test/parallel/test-https-agent-unref-socket.js" - "test/parallel/test-corepack-yarn-install.js")) + '("test/parallel/test-https-agent-unref-socket.js")) ;; This test is timing-sensitive, and fails sporadically on ;; slow, busy, or even very fast machines. @@ -867,9 +882,9 @@ source files.") c-ares-for-node brotli icu4c - libuv-for-node - `(,nghttp2-for-node "lib") - openssl-1.1 + libuv + `(,nghttp2 "lib") + openssl zlib ;; Regular build-time dependencies. perl @@ -882,18 +897,18 @@ source files.") coreutils c-ares-for-node icu4c - libuv-for-node + libuv llhttp-bootstrap brotli - `(,nghttp2-for-node "lib") - openssl-1.1 + `(,nghttp2 "lib") + openssl zlib)))) (define-public libnode - (package/inherit node + (package/inherit node-lts (name "libnode") (arguments - (substitute-keyword-arguments (package-arguments node) + (substitute-keyword-arguments (package-arguments node-lts) ((#:configure-flags flags ''()) `(cons* "--shared" "--without-npm" ,flags)) ((#:phases phases '%standard-phases) |