(name . guix-patches@gnu.org)(address . guix-patches@gnu.org)
From 0dc32f60b10c39f585d3535f3ff35e0e9812a6a0 Mon Sep 17 00:00:00 2001
From: Formbi <formbi@protonmail.com>
Date: Fri, 31 Jul 2020 19:09:26 +0200
Subject: [PATCH 2/2] bump node to 14.6
---
gnu/packages/node.scm | 54 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
Toggle diff (67 lines)
diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm
index 1adb2cd07f..a7658e626a 100644
--- a/gnu/packages/node.scm
+++ b/gnu/packages/node.scm
@@ -199,6 +199,60 @@ devices.")
(properties '((max-silent-time . 7200) ;2h, needed on ARM
(timeout . 21600))))) ;6h
+(define-public node-14.6
+ (package
+ (inherit node)
+ (version "14.6.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://nodejs.org/dist/v" version
+ "/node-v" version ".tar.xz"))
+ (sha256
+ (base32
+ "153a07ffrmvwbsc78wrc0xnwymmzrhva0kn6mgnfi3086v3h1wss"))
+ (modules '((guix build utils)))
+ (snippet
+ `(begin
+ ;; Remove bundled software.
+ (for-each delete-file-recursively
+ '("deps/cares"
+ "deps/icu-small"
+ "deps/openssl"))
+ (substitute* "Makefile"
+ ;; Remove references to bundled software.
+ (("deps/http_parser/http_parser.gyp") "")
+ (("deps/uv/include/\\*.h") ""))
+ #t))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments node)
+ ((#:configure-flags configure-flags)
+ ''("--shared-cares"
+ ;; "--shared-http-parser"
+ ;; node can't find the pkg-config file for http-parser
+ "--shared-libuv"
+ ;; "--shared-nghttp2"
+ ;; for some reason only the bundled nghttp2 works
+ "--shared-openssl"
+ "--shared-zlib"
+ ;; "--without-snapshot"
+ ;; this option is no longer available
+ "--with-intl=system-icu"))
+ ;; Almost all the tests require NPM and the one that doesn't does
+ ;; something stupid and fails on 14.6
+ ((#:tests? _ #f) #f)
+ ;; The patch-files was preparing the tests, now it's not needed
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (delete 'patch-files)))))
+ (inputs
+ `(("c-ares" ,c-ares)
+ ("http-parser" ,http-parser)
+ ("icu4c" ,icu4c-67)
+ ("libuv" ,libuv-1.38)
+ ("openssl" ,openssl)
+ ("zlib" ,zlib)
+ ("brotli" ,google-brotli)))))
+
(define-public libnode
(package
(inherit node)
--
2.26.0