1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Cyrill Schenkel <cyrill.schenkel@gmail.com>
3 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
5 ;;; Copyright © 2016, 2021 Ludovic Courtès <ludo@gnu.org>
6 ;;; Copyright © 2017 Mike Gerwitz <mtg@gnu.org>
7 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2018-2022 Marius Bakke <marius@gnu.org>
9 ;;; Copyright © 2020, 2021 Pierre Langlois <pierre.langlois@gmx.com>
10 ;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
12 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
13 ;;; Copyright © 2021, 2022 Philip McGrath <philip@philipmcgrath.com>
15 ;;; This file is part of GNU Guix.
17 ;;; GNU Guix is free software; you can redistribute it and/or modify it
18 ;;; under the terms of the GNU General Public License as published by
19 ;;; the Free Software Foundation; either version 3 of the License, or (at
20 ;;; your option) any later version.
22 ;;; GNU Guix is distributed in the hope that it will be useful, but
23 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ;;; GNU General Public License for more details.
27 ;;; You should have received a copy of the GNU General Public License
28 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30 (define-module (gnu packages node)
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module ((guix build utils) #:select (alist-replace))
33 #:use-module (guix packages)
34 #:use-module (guix derivations)
35 #:use-module (guix download)
36 #:use-module (guix git-download)
37 #:use-module (guix utils)
38 #:use-module (guix build-system gnu)
39 #:use-module (guix build-system node)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages adns)
42 #:use-module (gnu packages base)
43 #:use-module (gnu packages bash)
44 #:use-module (gnu packages compression)
45 #:use-module (gnu packages gcc)
46 #:use-module (gnu packages icu4c)
47 #:use-module (gnu packages libevent)
48 #:use-module (gnu packages linux)
49 #:use-module (gnu packages node-xyz)
50 #:use-module (gnu packages perl)
51 #:use-module (gnu packages pkg-config)
52 #:use-module (gnu packages python)
53 #:use-module (gnu packages tls)
54 #:use-module (gnu packages web)
55 #:use-module (ice-9 match)
56 #:use-module (srfi srfi-26))
64 (uri (string-append "https://nodejs.org/dist/v" version
65 "/node-v" version ".tar.xz"))
68 "032801kg24j04xmf09m0vxzlcz86sv21s24lv9l4cfv08k1c4byp"))
69 (modules '((guix build utils)))
72 ;; Patch for compatibility with ICU 68 and newer, which
73 ;; removed the public TRUE and FALSE macros.
74 (substitute* '("deps/v8/src/objects/intl-objects.cc"
75 "deps/v8/src/runtime/runtime-intl.cc")
79 ;; Remove bundled software.
80 (for-each delete-file-recursively
88 (substitute* "Makefile"
89 ;; Remove references to bundled software.
90 (("deps/http_parser/http_parser.gyp") "")
91 (("deps/uv/include/\\*.h") "")
92 (("deps/uv/uv.gyp") "")
93 (("deps/zlib/zlib.gyp") ""))))))
94 (build-system gnu-build-system)
96 `(#:configure-flags '("--shared-cares"
97 "--shared-http-parser"
103 "--with-intl=system-icu")
104 ;; Run only the CI tests. The default test target requires additional
105 ;; add-ons from NPM that are not distributed with the source.
106 #:test-target "test-ci-js"
108 ((guix build gnu-build-system)
113 (modify-phases %standard-phases
114 (add-before 'configure 'patch-hardcoded-program-references
115 (lambda* (#:key inputs #:allow-other-keys)
117 ;; Fix hardcoded /bin/sh references.
120 '("lib/child_process.js"
121 "lib/internal/v8_prof_polyfill.js"
122 "test/parallel/test-child-process-spawnsync-shell.js"
123 "test/parallel/test-stdio-closed.js"
124 "test/sequential/test-child-process-emfile.js"))
125 ;; not in bootstap node:
126 (sigxfsz "test/parallel/test-fs-write-sigxfsz.js"))
127 (if (file-exists? sigxfsz)
128 (cons sigxfsz common)
131 (string-append "'" (assoc-ref inputs "bash") "/bin/sh'")))
133 ;; Fix hardcoded /usr/bin/env references.
134 (substitute* '("test/parallel/test-child-process-default-options.js"
135 "test/parallel/test-child-process-env.js"
136 "test/parallel/test-child-process-exec-env.js")
138 (string-append "'" (assoc-ref inputs "coreutils")
140 (add-after 'patch-hardcoded-program-references
141 'delete-problematic-tests
142 (lambda* (#:key inputs #:allow-other-keys)
144 ;; FIXME: These tests fail in the build container, but they don't
145 ;; seem to be indicative of real problems in practice.
146 (for-each delete-file
147 '("test/parallel/test-cluster-master-error.js"
148 "test/parallel/test-cluster-master-kill.js"
149 ;; See also <https://github.com/nodejs/node/issues/25903>.
150 "test/sequential/test-performance.js"))
152 ;; This requires a DNS resolver.
153 (delete-file "test/parallel/test-dns.js")
155 ;; This test is timing-sensitive, and fails sporadically on
156 ;; slow, busy, or even very fast machines.
157 (delete-file "test/parallel/test-fs-utimes.js")
159 ;; FIXME: This test fails randomly:
160 ;; https://github.com/nodejs/node/issues/31213
161 (delete-file "test/parallel/test-net-listen-after-destroying-stdin.js")
163 ;; FIXME: These tests fail on armhf-linux:
164 ;; https://github.com/nodejs/node/issues/31970
165 ,@(if (string-prefix? "arm" (%current-system))
166 '((for-each delete-file
167 '("test/parallel/test-zlib.js"
168 "test/parallel/test-zlib-brotli.js"
169 "test/parallel/test-zlib-brotli-flush.js"
170 "test/parallel/test-zlib-brotli-from-brotli.js"
171 "test/parallel/test-zlib-brotli-from-string.js"
172 "test/parallel/test-zlib-convenience-methods.js"
173 "test/parallel/test-zlib-random-byte-pipes.js"
174 "test/parallel/test-zlib-write-after-flush.js")))
177 ;; These tests have an expiry date: they depend on the validity of
178 ;; TLS certificates that are bundled with the source. We want this
179 ;; package to be reproducible forever, so remove those.
180 ;; TODO: Regenerate certs instead.
181 (for-each delete-file
182 '("test/parallel/test-tls-passphrase.js"
183 "test/parallel/test-tls-server-verify.js"))))
184 (add-before 'configure 'set-bootstrap-host-rpath
185 (lambda* (#:key native-inputs inputs #:allow-other-keys)
186 (let* ((inputs (or native-inputs inputs))
187 (c-ares (assoc-ref inputs "c-ares"))
188 (http-parser (assoc-ref inputs "http-parser"))
189 (icu4c (assoc-ref inputs "icu4c"))
190 (nghttp2 (assoc-ref inputs "nghttp2"))
191 (openssl (assoc-ref inputs "openssl"))
192 (libuv (assoc-ref inputs "libuv"))
193 (zlib (assoc-ref inputs "zlib")))
194 (substitute* "deps/v8/gypfiles/v8.gyp"
195 (("'target_name': 'torque'," target)
196 (string-append target
197 "'ldflags': ['-Wl,-rpath="
207 ;; Node's configure script is actually a python script, so we can't
209 (lambda* (#:key outputs (configure-flags '()) native-inputs inputs
211 (let* ((prefix (assoc-ref outputs "out"))
212 (xflags ,(if (%current-target-system)
213 `'("--cross-compiling"
216 (match (%current-target-system)
217 ((? (cut string-prefix? "arm" <>))
219 ((? (cut string-prefix? "aarch64" <>))
221 ((? (cut string-prefix? "i686" <>))
223 ((? (cut string-prefix? "x86_64" <>))
225 ((? (cut string-prefix? "powerpc64" <>))
229 (flags (cons (string-append "--prefix=" prefix)
230 (append xflags configure-flags))))
231 (format #t "build directory: ~s~%" (getcwd))
232 (format #t "configure flags: ~s~%" flags)
233 ;; Node's configure script expects the CC environment variable to
235 (setenv "CC_host" "gcc")
236 (setenv "CXX_host" "g++")
237 (setenv "CC" ,(cc-for-target))
238 (setenv "CXX" ,(cxx-for-target))
239 (setenv "PKG_CONFIG" ,(pkg-config-for-target))
241 (let ((inpts (or native-inputs inputs)))
242 (with-exception-handler
244 (if (search-error? e)
245 (search-input-file inpts "/bin/python3")
246 (raise-exception e)))
248 (search-input-file inpts "/bin/python"))))
251 (add-after 'patch-shebangs 'patch-nested-shebangs
252 (lambda* (#:key inputs outputs #:allow-other-keys)
253 ;; Based on the implementation of patch-shebangs
254 ;; from (guix build gnu-build-system).
255 (let ((path (append-map (match-lambda
257 (list (string-append dir "/bin")
258 (string-append dir "/sbin")
259 (string-append dir "/libexec"))))
260 (append outputs inputs))))
263 (patch-shebang file path))
264 (find-files (search-input-directory outputs "lib/node_modules")
266 (executable-file? file))
268 (add-after 'install 'install-npmrc
269 ;; Note: programs like node-gyp only receive these values if
270 ;; they are started via `npm` or `npx`.
271 ;; See: https://github.com/nodejs/node-gyp#npm-configuration
272 (lambda* (#:key outputs #:allow-other-keys)
273 (let* ((out (assoc-ref outputs "out")))
275 ;; Use the config file "primarily for distribution
276 ;; maintainers" rather than "{prefix}/etc/npmrc",
277 ;; especially because node-build-system uses --prefix
278 ;; to install things to their store paths:
279 (string-append out "/lib/node_modules/npm/npmrc")
281 ;; Tell npm (mostly node-gyp) where to find our
282 ;; installed headers so it doesn't try to
283 ;; download them from the internet:
284 (format #t "nodedir=~a\n" out)))))))))
286 ;; Runtime dependencies for binaries used as a bootstrap.
294 ;; Regular build-time dependencies.
301 (list (search-path-specification
302 (variable "NODE_PATH")
303 (files '("lib/node_modules")))))
313 python-wrapper ;for node-gyp (supports python3)
315 (synopsis "Evented I/O for V8 JavaScript")
317 "Node.js is a platform built on Chrome's JavaScript runtime
318 for easily building fast, scalable network applications. Node.js uses an
319 event-driven, non-blocking I/O model that makes it lightweight and efficient,
320 perfect for data-intensive real-time applications that run across distributed
322 (home-page "https://nodejs.org/")
323 (license license:expat)
324 (properties '((max-silent-time . 7200) ;2h, needed on ARM
325 (timeout . 21600) ;6h
326 (cpe-name . "node.js")))))
328 ;; This should be the latest version of node that still builds without
329 ;; depending on llhttp.
330 (define-public node-bootstrap
331 (hidden-package node))
333 ;; Duplicate of node-semver
334 (define-public node-semver-bootstrap
341 (url "https://github.com/npm/node-semver")
342 (commit (string-append "v" version))))
343 (file-name (git-file-name name version))
346 "06biknqb05r9xsmcflm3ygh50pjvdk84x6r79w43kmck4fn3qn5p"))))
347 (build-system node-build-system)
349 `(#:node ,node-bootstrap
352 (modify-phases %standard-phases
353 (add-after 'patch-dependencies 'delete-dependencies
355 (delete-dependencies '("tap")))))))
356 (home-page "https://github.com/npm/node-semver")
357 (properties '((hidden? . #t)))
358 (synopsis "Parses semantic versions strings")
360 "@code{node-semver} is a JavaScript implementation of the
361 @uref{https://semver.org/, SemVer.org} specification.")
362 (license license:isc)))
364 (define-public node-ms-bootstrap
372 (url "https://github.com/vercel/ms.git")
374 (file-name (git-file-name name version))
377 "1pjxzbi4j8pinlsc7yxvfrh0b47kb2dc4lfc2rjq4wx5bdwl33fj"))))
378 (build-system node-build-system)
380 `(#:node ,node-bootstrap
383 (modify-phases %standard-phases
384 (add-after 'patch-dependencies 'delete-dependencies
386 (delete-dependencies '("eslint"
391 (home-page "https://github.com/zeit/ms#readme")
392 (properties '((hidden? . #t)))
393 (synopsis "Tiny millisecond conversion utility")
394 (description "Use this package to easily convert various time
395 formats to milliseconds.")
396 (license license:expat)))
398 (define-public node-binary-search-bootstrap
400 (name "node-binary-search")
406 (url "https://github.com/darkskyapp/binary-search.git")
407 (commit (string-append "v" version))))
408 (file-name (git-file-name name version))
411 "1xr2msdc143cd3xwgq7n3rhzy7j8wrnaidxl0r6l6b6g3mpbpjig"))))
412 (build-system node-build-system)
414 `(#:node ,node-bootstrap
417 (modify-phases %standard-phases
418 (add-after 'patch-dependencies 'delete-dependencies
420 (delete-dependencies `("chai" "mocha")))))))
421 (home-page "https://github.com/darkskyapp/binary-search#readme")
422 (properties '((hidden? . #t)))
423 (synopsis "Tiny binary search function with comparators")
424 (description "This package is a binary search function for Node.js.")
425 (license license:cc0)))
427 (define-public node-debug-bootstrap
435 (url "https://github.com/visionmedia/debug.git")
437 (file-name (git-file-name name version))
440 "08g52r1d4yqcsfdfb7n5if33d4cghaq75gx5n9hj6m6fd8jfp2pi"))))
441 (build-system node-build-system)
443 `(#:node ,node-bootstrap
446 (modify-phases %standard-phases
447 (add-after 'patch-dependencies 'delete-dependencies
449 (delete-dependencies `("brfs"
455 "karma-chrome-launcher"
458 "mocha-lcov-reporter"
460 (inputs (list node-ms-bootstrap))
461 (home-page "https://github.com/visionmedia/debug#readme")
462 (properties '((hidden? . #t)))
463 (synopsis "Small debugging utility")
464 (description "This package contains a tiny JavaScript debugging
465 utility modelled after Node.js core's debugging technique. It works in
466 Node.js and web browsers.")
467 (license license:expat)))
469 (define-public node-llparse-builder-bootstrap
471 (name "node-llparse-builder")
477 (url "https://github.com/indutny/llparse-builder.git")
478 (commit (string-append "v" version))))
479 (file-name (git-file-name name version))
482 "0r82iiwqsb73k2fxw7842rjjiixllxpyc6yl9cq4ma6ybkf6xmzm"))
483 (modules '((guix build utils)))
486 ;; FIXME: Unneeded runtime dependency.
487 ;; https://github.com/indutny/llparse-builder/pull/2
488 (substitute* "package.json"
489 (("\"@types/debug.*,") ""))
490 ;; Fix imports for esbuild.
491 ;; https://github.com/evanw/esbuild/issues/477
492 (substitute* '("src/node/invoke.ts"
494 "src/node/consume.ts"
500 "src/loop-checker/index.ts"
501 "src/loop-checker/lattice.ts"
503 "src/span-allocator.ts")
504 (("\\* as assert") "assert")
505 (("\\* as debugAPI") "debugAPI"))
507 (build-system node-build-system)
509 `(#:node ,node-bootstrap
512 (modify-phases %standard-phases
513 (add-after 'patch-dependencies 'delete-dependencies
515 (delete-dependencies `("@types/mocha"
522 (lambda* (#:key inputs #:allow-other-keys)
523 (let ((esbuild (search-input-file inputs "/bin/esbuild")))
526 "--outfile=lib/builder.js"
528 "src/builder.ts")))))))
530 (list node-binary-search-bootstrap node-debug-bootstrap))
533 (home-page "https://github.com/indutny/llparse-builder#readme")
534 (properties '((hidden? . #t)))
535 (synopsis "Graph builder for consumption by llparse")
536 (description "This package builds graphs for consumption by llparse.")
537 (license license:expat)))
539 (define-public node-llparse-frontend-bootstrap
541 (name "node-llparse-frontend")
547 (url "https://github.com/indutny/llparse-frontend.git")
548 (commit (string-append "v" version))))
549 (file-name (git-file-name name version))
551 (base32 "1rm9g4ifyip30svm5cgnf0gx7d45jgh4mpf2hkd092xhngmfvicc"))
552 (modules '((guix build utils)))
555 ;; Fix imports for esbuild.
556 ;; https://github.com/evanw/esbuild/issues/477
557 (substitute* '("src/frontend.ts"
558 "src/code/field-value.ts"
559 "src/container/index.ts"
560 "src/container/wrap.ts"
561 "src/node/sequence.ts"
563 "src/node/table-lookup.ts"
565 (("\\* as assert") "assert")
566 (("\\* as debugAPI") "debugAPI"))
568 (build-system node-build-system)
570 `(#:node ,node-bootstrap
573 (modify-phases %standard-phases
574 (add-after 'patch-dependencies 'delete-dependencies
576 (delete-dependencies `("@types/debug"
584 (lambda* (#:key inputs #:allow-other-keys)
585 (let ((esbuild (search-input-file inputs "/bin/esbuild")))
588 "--outfile=lib/frontend.js"
590 "src/frontend.ts")))))))
592 (list node-debug-bootstrap node-llparse-builder-bootstrap))
595 (home-page "https://github.com/indutny/llparse-frontend#readme")
596 (properties '((hidden? . #t)))
597 (synopsis "Frontend for the llparse compiler")
598 (description "This package is a frontend for the llparse compiler.")
599 (license license:expat)))
601 (define-public node-llparse-bootstrap
603 (name "node-llparse")
609 (url "https://github.com/indutny/llparse.git")
610 (commit (string-append "v" version))))
611 (file-name (git-file-name name version))
614 "10da273iy2if88hp79cwms6c8qpsl1fkgzll6gmqyx5yxv5mkyp6"))
615 (modules '((guix build utils)))
618 ;; Fix imports for esbuild.
619 ;; https://github.com/evanw/esbuild/issues/477
620 (substitute* '("src/compiler/index.ts"
621 "src/implementation/c/node/base.ts"
622 "src/implementation/c/node/table-lookup.ts"
623 "src/implementation/c/compilation.ts"
624 "src/implementation/c/helpers/match-sequence.ts"
625 "src/implementation/c/code/mul-add.ts")
626 (("\\* as assert") "assert")
627 (("\\* as debugAPI") "debugAPI"))
629 (build-system node-build-system)
631 `(#:node ,node-bootstrap
634 (modify-phases %standard-phases
635 (add-after 'patch-dependencies 'delete-dependencies
637 (delete-dependencies `("@types/debug"
641 "llparse-test-fixture"
647 (lambda* (#:key inputs #:allow-other-keys)
648 (let ((esbuild (search-input-file inputs "/bin/esbuild")))
651 "--outfile=lib/api.js"
655 (list node-debug-bootstrap node-llparse-frontend-bootstrap))
658 (home-page "https://github.com/nodejs/llparse#readme")
659 (properties '((hidden? . #t)))
660 (synopsis "Compile incremental parsers to C code")
661 (description "This package offers an API for compiling an incremental
662 parser definition into a C output.")
663 (license license:expat)))
665 (define-public llhttp-bootstrap
672 (url "https://github.com/nodejs/llhttp.git")
673 (commit (string-append "v" version))))
674 (file-name (git-file-name name version))
677 "115mwyds9655p76lhglxg2blc1ksgrix6zhigaxnc2q6syy3pa6x"))
678 (patches (search-patches "llhttp-bootstrap-CVE-2020-8287.patch"))
679 (modules '((guix build utils)))
682 ;; Fix imports for esbuild.
683 ;; https://github.com/evanw/esbuild/issues/477
684 (substitute* "src/llhttp/http.ts"
685 (("\\* as assert") "assert"))
686 (substitute* "Makefile"
687 (("npx ts-node bin/generate.ts")
688 "node bin/generate.js"))
690 (build-system gnu-build-system)
692 `(#:tests? #f ; no tests
693 #:make-flags (list (string-append "CLANG=" ,(cc-for-target))
694 (string-append "DESTDIR=" (assoc-ref %outputs "out"))
697 (modify-phases %standard-phases
699 (lambda* (#:key inputs native-inputs #:allow-other-keys)
700 (let ((esbuild (search-input-file (or native-inputs inputs)
704 "--outfile=bin/generate.js"
705 "--bundle" "bin/generate.ts"))))
706 (add-before 'install 'create-install-directories
707 (lambda* (#:key outputs #:allow-other-keys)
708 (let ((out (assoc-ref outputs "out")))
709 (for-each (lambda (dir)
710 (mkdir-p (string-append out dir)))
711 (list "/lib" "/include" "/src"))
713 (add-after 'install 'install-src
714 (lambda* (#:key outputs #:allow-other-keys)
715 (let* ((out (assoc-ref outputs "out"))
716 (src-dir (string-append out "/src")))
717 (install-file "build/c/llhttp.c" src-dir)
718 (install-file "src/native/api.c" src-dir)
719 (install-file "src/native/http.c" src-dir)
722 `(("esbuild" ,esbuild)
723 ("node" ,node-bootstrap)
724 ("node-semver" ,node-semver-bootstrap)
725 ("node-llparse-bootstrap" ,node-llparse-bootstrap)))
726 (home-page "https://github.com/nodejs/llhttp")
727 (properties '((hidden? . #t)))
728 (synopsis "Parser for HTTP messages")
729 (description "This is a rewrite of
730 @url{https://github.com/nodejs/http-parser, http-parser} using
731 @url{https://github.com/nodejs/llparse, llparse} to generate the C
733 (license license:expat)))
735 (define-public node-lts
741 (uri (string-append "https://nodejs.org/dist/v" version
742 "/node-v" version ".tar.xz"))
745 "026nd6vihjdqz4jn0slg89m8m5vvkvjzgg1aip3dcg9lrm1w8fkq"))
746 (modules '((guix build utils)))
749 ;; Remove bundled software, where possible
750 (for-each delete-file-recursively
756 (substitute* "Makefile"
757 ;; Remove references to bundled software.
758 (("deps/uv/uv.gyp") "")
759 (("deps/zlib/zlib.gyp") ""))
762 (substitute-keyword-arguments (package-arguments node)
763 ((#:configure-flags configure-flags)
770 "--with-intl=system-icu"))
772 `(modify-phases ,phases
773 (replace 'set-bootstrap-host-rpath
774 (lambda* (#:key native-inputs inputs #:allow-other-keys)
775 (let* ((inputs (or native-inputs inputs))
776 (c-ares (assoc-ref inputs "c-ares"))
777 (brotli (assoc-ref inputs "brotli"))
778 (icu4c (assoc-ref inputs "icu4c"))
779 (nghttp2 (assoc-ref inputs "nghttp2"))
780 (openssl (assoc-ref inputs "openssl"))
781 (libuv (assoc-ref inputs "libuv"))
782 (zlib (assoc-ref inputs "zlib"))
783 (host-binaries '("torque"
784 "bytecode_builtins_list_generator"
785 "gen-regexp-special-case"
788 (substitute* '("node.gyp" "tools/v8_gypfiles/v8.gyp")
789 (((string-append "'target_name': '("
790 (string-join host-binaries "|")
793 (string-append target
794 "'ldflags': ['-Wl,-rpath="
803 (replace 'delete-problematic-tests
804 (lambda* (#:key inputs #:allow-other-keys)
805 ;; FIXME: These tests fail in the build container, but they don't
806 ;; seem to be indicative of real problems in practice.
807 (for-each delete-file
808 '("test/parallel/test-cluster-master-error.js"
809 "test/parallel/test-cluster-master-kill.js"))
811 ;; These require a DNS resolver.
812 (for-each delete-file
813 '("test/parallel/test-dns.js"
814 "test/parallel/test-dns-lookupService-promises.js"))
816 ;; These tests require networking.
817 (delete-file "test/parallel/test-https-agent-unref-socket.js")
819 ;; This test is timing-sensitive, and fails sporadically on
820 ;; slow, busy, or even very fast machines.
821 (delete-file "test/parallel/test-fs-utimes.js")
823 ;; FIXME: This test fails randomly:
824 ;; https://github.com/nodejs/node/issues/31213
825 (delete-file "test/parallel/test-net-listen-after-destroying-stdin.js")
827 ;; FIXME: These tests fail on armhf-linux:
828 ;; https://github.com/nodejs/node/issues/31970
829 ,@(if (target-arm32?)
830 '((for-each delete-file
831 '("test/parallel/test-zlib.js"
832 "test/parallel/test-zlib-brotli.js"
833 "test/parallel/test-zlib-brotli-flush.js"
834 "test/parallel/test-zlib-brotli-from-brotli.js"
835 "test/parallel/test-zlib-brotli-from-string.js"
836 "test/parallel/test-zlib-convenience-methods.js"
837 "test/parallel/test-zlib-random-byte-pipes.js"
838 "test/parallel/test-zlib-write-after-flush.js")))
841 ;; These tests have an expiry date: they depend on the validity of
842 ;; TLS certificates that are bundled with the source. We want this
843 ;; package to be reproducible forever, so remove those.
844 ;; TODO: Regenerate certs instead.
845 (for-each delete-file
846 '("test/parallel/test-tls-passphrase.js"
847 "test/parallel/test-tls-server-verify.js"))))
848 (add-after 'delete-problematic-tests 'replace-llhttp-sources
849 (lambda* (#:key inputs #:allow-other-keys)
850 ;; Replace pre-generated llhttp sources
851 (let ((llhttp (assoc-ref inputs "llhttp")))
852 (copy-file (string-append llhttp "/src/llhttp.c")
853 "deps/llhttp/src/llhttp.c")
854 (copy-file (string-append llhttp "/src/api.c")
855 "deps/llhttp/src/api.c")
856 (copy-file (string-append llhttp "/src/http.c")
857 "deps/llhttp/src/http.c")
858 (copy-file (string-append llhttp "/include/llhttp.h")
859 "deps/llhttp/include/llhttp.h"))))))))
861 (list ;; Runtime dependencies for binaries used as a bootstrap.
869 ;; Regular build-time dependencies.
885 python-wrapper ;; for node-gyp (supports python3)
888 (define-public libnode
889 (package/inherit node
892 (substitute-keyword-arguments (package-arguments node)
893 ((#:configure-flags flags ''())
894 `(cons* "--shared" "--without-npm" ,flags))
895 ((#:phases phases '%standard-phases)
896 `(modify-phases ,phases
897 (delete 'install-npmrc)
898 (delete 'patch-nested-shebangs)))))))