X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/0c0431f9ce32a64ca663a2c5fc6656cbb86dc245..6fbf92ee7834c3ed5879f4665981b033f92733c5:/gnu/packages/node.scm diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index 1a79066eac..83427d935f 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -4,6 +4,8 @@ ;;; Copyright © 2015, 2016 David Thompson ;;; Copyright © 2016 Ludovic Courtès ;;; Copyright © 2017 Mike Gerwitz +;;; Copyright © 2018 Tobias Geerinckx-Rice +;;; Copyright © 2018, 2019 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -43,14 +45,14 @@ (define-public node (package (name "node") - (version "9.11.1") + (version "10.16.0") (source (origin (method url-fetch) - (uri (string-append "http://nodejs.org/dist/v" version - "/node-v" version ".tar.gz")) + (uri (string-append "https://nodejs.org/dist/v" version + "/node-v" version ".tar.xz")) (sha256 (base32 - "1vjh9zvw7wkdz6b0l99ya7mqjk0l8lbg9isr1q8rxwp400dhkk32")) + "0236jlb1hxhzqjlmmlxipcycrndiq92c8434iyy7zshh3n4pzqqq")) (modules '((guix build utils))) (snippet `(begin @@ -64,7 +66,7 @@ "deps/uv" "deps/zlib")) (substitute* "Makefile" - ;; Remove references to bundled software + ;; Remove references to bundled software. (("deps/http_parser/http_parser.gyp") "") (("deps/uv/include/\\*.h") "") (("deps/uv/uv.gyp") "") @@ -81,6 +83,9 @@ "--shared-zlib" "--without-snapshot" "--with-intl=system-icu") + ;; Run only the CI tests. The default test target requires additional + ;; add-ons from NPM that are not distributed with the source. + #:test-target "test-ci-js" #:phases (modify-phases %standard-phases (add-before 'configure 'patch-files @@ -89,7 +94,8 @@ (substitute* '("lib/child_process.js" "lib/internal/v8_prof_polyfill.js" "test/parallel/test-child-process-spawnsync-shell.js" - "test/parallel/test-stdio-closed.js") + "test/parallel/test-stdio-closed.js" + "test/sequential/test-child-process-emfile.js") (("'/bin/sh'") (string-append "'" (which "sh") "'"))) @@ -100,30 +106,24 @@ (("'/usr/bin/env'") (string-append "'" (which "env") "'"))) - ;; FIXME: These tests depend on being able to install eslint. - ;; See https://github.com/nodejs/node/issues/17098. - (for-each delete-file - '("test/parallel/test-eslint-alphabetize-errors.js" - "test/parallel/test-eslint-buffer-constructor.js" - "test/parallel/test-eslint-documented-errors.js" - "test/parallel/test-eslint-inspector-check.js")) - ;; 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/async-hooks/test-ttywrap.readstream.js" - "test/parallel/test-util-inspect.js" - "test/parallel/test-v8-serdes.js" - "test/parallel/test-dgram-membership.js" - "test/parallel/test-dns-cancel-reverse-lookup.js" - "test/parallel/test-dns-resolveany.js" - "test/parallel/test-cluster-master-error.js" + '("test/parallel/test-cluster-master-error.js" "test/parallel/test-cluster-master-kill.js" - "test/parallel/test-net-listen-after-destroying-stdin.js" - "test/parallel/test-npm-install.js" - "test/sequential/test-child-process-emfile.js" - "test/sequential/test-benchmark-child-process.js" - "test/sequential/test-http-regr-gh-2928.js")) + ;; See also . + "test/sequential/test-performance.js")) + + ;; This requires a DNS resolver. + (delete-file "test/parallel/test-dns.js") + + ;; These tests have an expiry date: they depend on the validity of + ;; TLS certificates that are bundled with the source. We want this + ;; package to be reproducible forever, so remove those. + ;; TODO: Regenerate certs instead. + (for-each delete-file + '("test/parallel/test-tls-passphrase.js" + "test/parallel/test-tls-server-verify.js")) #t)) (replace 'configure ;; Node's configure script is actually a python script, so we can't @@ -138,10 +138,10 @@ ;; Node's configure script expects the CC environment variable to ;; be set. (setenv "CC" (string-append (assoc-ref inputs "gcc") "/bin/gcc")) - (zero? (apply system* - (string-append (assoc-ref inputs "python") - "/bin/python") - "configure" flags))))) + (apply invoke + (string-append (assoc-ref inputs "python") + "/bin/python") + "configure" flags)))) (add-after 'patch-shebangs 'patch-npm-shebang (lambda* (#:key outputs #:allow-other-keys) (let* ((bindir (string-append (assoc-ref outputs "out") @@ -176,6 +176,6 @@ for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.") - (home-page "http://nodejs.org/") + (home-page "https://nodejs.org/") (license expat) (properties '((timeout . 3600))))) ; 1 h