From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id Qjs1EbbNYmDn7AAAgWs5BA (envelope-from ) for ; Tue, 30 Mar 2021 09:05:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 4PsKCrbNYmDBAQAA1q6Kng (envelope-from ) for ; Tue, 30 Mar 2021 07:05:26 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A53C420F61 for ; Tue, 30 Mar 2021 09:05:25 +0200 (CEST) Received: from localhost ([::1]:52682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lR8RI-0000u5-EO for larch@yhetil.org; Tue, 30 Mar 2021 03:05:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58842) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lR8Qw-0000tv-B1 for guix-patches@gnu.org; Tue, 30 Mar 2021 03:05:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lR8Qw-0007Ab-3D for guix-patches@gnu.org; Tue, 30 Mar 2021 03:05:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lR8Qv-0001zp-Ui for guix-patches@gnu.org; Tue, 30 Mar 2021 03:05:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47282] [PATCH v2 13/13] gnu: Add node-lts. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 30 Mar 2021 07:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47282 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Timothy Sample Cc: Jelle Licht , 47282@debbugs.gnu.org Received: via spool by 47282-submit@debbugs.gnu.org id=B47282.16170878957658 (code B ref 47282); Tue, 30 Mar 2021 07:05:01 +0000 Received: (at 47282) by debbugs.gnu.org; 30 Mar 2021 07:04:55 +0000 Received: from localhost ([127.0.0.1]:50240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lR8Qp-0001zS-3r for submit@debbugs.gnu.org; Tue, 30 Mar 2021 03:04:55 -0400 Received: from flashner.co.il ([178.62.234.194]:37586) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lR8Qi-0001z7-HH for 47282@debbugs.gnu.org; Tue, 30 Mar 2021 03:04:53 -0400 Received: from localhost (unknown [31.210.177.71]) by flashner.co.il (Postfix) with ESMTPSA id B9C42401D4; Tue, 30 Mar 2021 07:04:42 +0000 (UTC) Date: Tue, 30 Mar 2021 10:04:08 +0300 From: Efraim Flashner Message-ID: References: <87k0pprz6n.fsf@ngyro.com> <20210330052743.575-13-samplet@ngyro.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="JTrVj+Ifk5u3RP/y" Content-Disposition: inline In-Reply-To: <20210330052743.575-13-samplet@ngyro.com> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1617087925; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=pAkcwzAPIQ/MnPcTBqKoa43UGXeLm7lr90c2cbkNPpE=; b=ZI/Jeviificp7EJflYVpkbQTFajUEUUTtUxwPdGmi60yWQYVjQKaVpkP1GK92JFPQd/JNU 5XbWXLIE9B5naZyrBtMuUUWRHkA0EhAv3Uev88kc0sfMDK2Qp2XoDqQ10Rv4s9ytZ4ECQe QZwNuy/qOTE9T+dEFYnJYobfIAxQatvLUHDIF35v39aCWl/XWEUey5dYFmqJ4xo0IJHN54 LsNcobxOrAitlSTHAVNkKufRy9AVsz0X3cSUPUGn4ceL+wpEPMag0o0fzsxsXsyEkdrK3N rDTjkOXyeygYLXWDAd+RvkrCsc0Wy0Vm834xhZL6XCW7TE+CJbAc6+SoEVBWOw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617087925; a=rsa-sha256; cv=none; b=Akqq3uKSaJ24q2fLvMTpPbabsEFB5rOTDo3G07Sr3p5QBQ7uhqOkmQqEmU2Y0SV5+vee+/ 0Pv0FUFUDR/ua7O0vttAM/GOk2LLjWk9soFR+gEGJz5Zhbl5y4rqdqTgBGu3TPMU9Hba0g lMs2Ig1bHEFZPBjMTV6wxR6GKYOlcO2uAxRDXtdSedDszp2Hc0iMplci9RIAOHAFr/MK3k FXZOk8zrqOd/15D0qaIr13lJmgTkI8MNwVohOR4hJ+CO/kMiDfEfrHi9qSuH4l9DXDXRgG voTjkmVjjnPEx6xEhc885KiCrfYYarNqfpQwb6gx36BdcLgDKar8Wjg4zHaL/A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -4.02 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: A53C420F61 X-Spam-Score: -4.02 X-Migadu-Scanner: scn0.migadu.com X-TUID: JjmEX4FKBqht --JTrVj+Ifk5u3RP/y Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 30, 2021 at 01:27:43AM -0400, Timothy Sample wrote: > From: Jelle Licht >=20 > * gnu/packages/node.scm (node-lts): New variable. > * guix/build-system/node.scm (default-node): Use it. > --- > gnu/packages/node.scm | 135 +++++++++++++++++++++++++++++++++++++ > guix/build-system/node.scm | 2 +- > 2 files changed, 136 insertions(+), 1 deletion(-) >=20 > diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm > index 45e5f8feca..249241f110 100644 > --- a/gnu/packages/node.scm > +++ b/gnu/packages/node.scm > @@ -580,6 +580,141 @@ parser definition into a C output.") > source files.") > (license license:expat))) > =20 > +(define-public node-lts > + (package > + (inherit node) > + (version "14.16.0") > + (source (origin > + (method url-fetch) > + (uri (string-append "https://nodejs.org/dist/v" version > + "/node-v" version ".tar.xz")) > + (sha256 > + (base32 > + "19nz2mhmn6ikahxqyna1dn25pb5v3z9vsz9zb2flb6zp2yk4hxjf")) > + (modules '((guix build utils))) > + (snippet > + `(begin > + ;; 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. > + (("deps/uv/uv.gyp") "") > + (("deps/zlib/zlib.gyp") "")) > + #t)))) > + (arguments > + (substitute-keyword-arguments (package-arguments node) > + ((#:configure-flags configure-flags) > + ''("--shared-cares" > + "--shared-libuv" > + "--shared-nghttp2" > + "--shared-openssl" > + "--shared-zlib" > + "--shared-brotli" > + "--with-intl=3Dsystem-icu")) > + ((#:phases phases) > + `(modify-phases ,phases > + (replace 'configure > + ;; Node's configure script is actually a python script, so = we can't > + ;; run it with bash. > + (lambda* (#:key outputs (configure-flags '()) inputs > + #:allow-other-keys) > + (let* ((prefix (assoc-ref outputs "out")) > + (flags (cons (string-append "--prefix=3D" prefix) > + configure-flags))) > + (format #t "build directory: ~s~%" (getcwd)) > + (format #t "configure flags: ~s~%" flags) > + ;; Node's configure script expects the CC environment v= ariable to > + ;; be set. > + (setenv "CC" (string-append (assoc-ref inputs "gcc") "/= bin/gcc")) again cc-for-target > + (apply invoke > + (string-append (assoc-ref inputs "python") > + "/bin/python3") > + "configure" flags)))) > + (replace 'patch-files > + (lambda* (#:key inputs #:allow-other-keys) > + ;; Fix hardcoded /bin/sh references. > + (substitute* '("lib/child_process.js" > + "lib/internal/v8_prof_polyfill.js" > + "test/parallel/test-child-process-spawnsyn= c-shell.js" > + "test/parallel/test-fs-write-sigxfsz.js" > + "test/parallel/test-stdio-closed.js" > + "test/sequential/test-child-process-emfile= =2Ejs") > + (("'/bin/sh'") > + (string-append "'" (which "sh") "'"))) > + > + ;; Fix hardcoded /usr/bin/env references. > + (substitute* '("test/parallel/test-child-process-default-= options.js" > + "test/parallel/test-child-process-env.js" > + "test/parallel/test-child-process-exec-env= =2Ejs") > + (("'/usr/bin/env'") > + (string-append "'" (which "env") "'"))) > + > + ;; FIXME: These tests fail in the build container, but th= ey 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")) > + > + ;; These require a DNS resolver. > + (for-each delete-file > + '("test/parallel/test-dns.js" > + "test/parallel/test-dns-lookupService-promise= s.js")) > + > + ;; FIXME: This test fails randomly: > + ;; https://github.com/nodejs/node/issues/31213 > + (delete-file "test/parallel/test-net-listen-after-destroy= ing-stdin.js") > + > + ;; FIXME: These tests fail on armhf-linux: > + ;; https://github.com/nodejs/node/issues/31970 > + ,@(if (string-prefix? "arm" (%current-system)) This could probably be changed to ,@(when (target-arm32?) > + '((for-each delete-file > + '("test/parallel/test-zlib.js" > + "test/parallel/test-zlib-brotli.js" > + "test/parallel/test-zlib-brotli-flush= =2Ejs" > + "test/parallel/test-zlib-brotli-from-= brotli.js" > + "test/parallel/test-zlib-brotli-from-= string.js" > + "test/parallel/test-zlib-convenience-= methods.js" > + "test/parallel/test-zlib-random-byte-= pipes.js" > + "test/parallel/test-zlib-write-after-= flush.js"))) > + '()) > + > + ;; These tests have an expiry date: they depend on the va= lidity 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")) > + > + ;; Replace pre-generated llhttp sources > + (let ((llhttp (assoc-ref inputs "llhttp"))) > + (copy-file (string-append llhttp "/src/llhttp.c") > + "deps/llhttp/src/llhttp.c") > + (copy-file (string-append llhttp "/src/api.c") > + "deps/llhttp/src/api.c") > + (copy-file (string-append llhttp "/src/http.c") > + "deps/llhttp/src/http.c") > + (copy-file (string-append llhttp "/include/llhttp.h") > + "deps/llhttp/include/llhttp.h")) > + #t)))))) > + (inputs > + `(("c-ares" ,c-ares) > + ("icu4c" ,icu4c-67) > + ("libuv" ,libuv-for-node) > + ("llhttp" ,llhttp-bootstrap) > + ("google-brotli" ,google-brotli) > + ("nghttp2" ,nghttp2 "lib") > + ("openssl" ,openssl) > + ("zlib" ,zlib))) > + (native-inputs > + (alist-replace "python" (list python-3) > + (package-native-inputs node))))) > + > (define-public libnode > (package/inherit node > (name "libnode") > diff --git a/guix/build-system/node.scm b/guix/build-system/node.scm > index 4991ed53a5..98f63f87ef 100644 > --- a/guix/build-system/node.scm > +++ b/guix/build-system/node.scm > @@ -39,7 +39,7 @@ > "Return the default Node package." > ;; Lazily resolve the binding to avoid a circular dependency. > (let ((node (resolve-interface '(gnu packages node)))) > - (module-ref node 'node))) > + (module-ref node 'node-lts))) > =20 > (define* (lower name > #:key source inputs native-inputs outputs system target > --=20 > 2.31.0 >=20 >=20 >=20 >=20 --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --JTrVj+Ifk5u3RP/y Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmBizWgACgkQQarn3Mo9 g1GbcQ/+KZuaJXt/+fPe+vcF8NhN0UGkFYmEHXkfzzamVdi2b2e6vN9GzSAI/A5P 6VVzj/Bq3URMwInJSultsni+UkXeUDI+7rw1J6tpPMPPUrmKW5mht0AexATbNQcB 777jAix3iqGYnkZjofKkzatO7XQIwE9jvuJS9UTDDRGw7sL07ZBwYUKaZarPPffW UZ4CgMFrbyj3Ge3UseBYlcVMbhh2/RuZzZNZu1er023jEk1USKrhJ7YRM9I5ATNe 2QydGVGsmCvhJnAlfXEwjsG3UYVz+m5Eb0oTzbZ1SaoPPv71OTxAF52eSzjm+Zpb 44dCYzdLgIf9jTX/8Xn44GOgllgdcp/DU/VrLp88498WcY9gDoGs7Z2PQVOnB+UI rMFahhhr/pspgDxMDCRRjBm3J9TpeqkhCDxzYk/VoFi8tAG/uV1A7SEVzrI1wTFQ HOAB5quVg2pV8Qf3Ax8CTu1NFeVtmjw5vGdMCQHfeHEQDtptyxNOrBe80nYYYg4x cllVkW8gS+qg9Var7hFUXrE82KpJt//4QMI3OwYBsbtazoB5ZJ0CeCZy/oXfLvqY ddlAUQ2QqpYEtdF9IYXgu2tk9/Y6mJlEZfXKwb3HEP5XXheZt0Fmts808G4SDHyJ Mkwrmk84m14+Gp37zQnjGf+0fxxh7L6iUo7Gqa67kqpNSu3iHy8= =PLBi -----END PGP SIGNATURE----- --JTrVj+Ifk5u3RP/y--