From patchwork Sat Mar 20 14:59:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jelle Licht X-Patchwork-Id: 27983 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 42EC527BC57; Sat, 20 Mar 2021 15:00:50 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4579327BC58 for ; Sat, 20 Mar 2021 15:00:49 +0000 (GMT) Received: from localhost ([::1]:51938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNd5s-0000R0-Ck for patchwork@mira.cbaines.net; Sat, 20 Mar 2021 11:00:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNd5A-0008RL-1G for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41467) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNd59-0001Z1-Pc for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNd59-0000NU-OZ for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47282] [PATCH 01/13] build-system: Rewrite node build system. References: <20210320145706.12308-1-jlicht@fsfe.org> In-Reply-To: <20210320145706.12308-1-jlicht@fsfe.org> Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Mar 2021 15:00:03 +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: 47282@debbugs.gnu.org Cc: Timothy Sample Received: via spool by 47282-submit@debbugs.gnu.org id=B47282.16162523741273 (code B ref 47282); Sat, 20 Mar 2021 15:00:03 +0000 Received: (at 47282) by debbugs.gnu.org; 20 Mar 2021 14:59:34 +0000 Received: from localhost ([127.0.0.1]:52980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4c-0000Js-Tt for submit@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:34 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:47214) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4a-0000JS-Sf for 47282@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:30 -0400 From: Jelle Licht Date: Sat, 20 Mar 2021 15:59:13 +0100 Message-Id: <20210320145925.12500-1-jlicht@fsfe.org> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * guix/build/node-build-system.scm: Rewrite it. * guix/build-system/node.scm: Adjust accordingly. * gnu/packages/node-xyz.scm (node-color-name, node-env-variable, node-far, node-long-stack-traces, node-mersenne, node-oop, node-stack-trace, node-statsd-parser, node-utils-deprecate, node-semver): Likewise. Co-authored-by: Timothy Sample --- gnu/packages/node-xyz.scm | 74 +++++++---- guix/build-system/node.scm | 37 ++---- guix/build/node-build-system.scm | 203 ++++++++++++++----------------- 3 files changed, 158 insertions(+), 156 deletions(-) diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm index b1d6d4ce59..7d7f0251d1 100644 --- a/gnu/packages/node-xyz.scm +++ b/gnu/packages/node-xyz.scm @@ -38,6 +38,11 @@ (base32 "09rbmj16nfwcwkhrybqxyy66bkrs50vpw6hkdqqb14l3gsyxpr74")))) (build-system node-build-system) + (arguments + `(#:phases + (modify-phases + %standard-phases + (delete 'build)))) (home-page "https://github.com/colorjs/color-name") (synopsis "JSON with CSS color names") (description @@ -59,7 +64,11 @@ (base32 "0nnpxjxfhy4na7fixb7p3ww6ard5xgggfm83b78i333867r4gmsq")))) (build-system node-build-system) - (arguments '(#:tests? #f)) ; No tests. + (arguments '(#:tests? #f ; No tests. + #:phases + (modify-phases + %standard-phases + (delete 'build)))) (home-page "https://github.com/bigpipe/env-variable") (synopsis "Environment variables for Node with fallbacks") (description "This package provides environment variables with @@ -85,6 +94,7 @@ (arguments '(#:phases (modify-phases %standard-phases + (delete 'build) (replace 'check (lambda _ ;; We skip the two tests which are supposed to fail. @@ -113,7 +123,10 @@ codes.") (base32 "0famwsyc6xawi30v25zi65d8fhbvlvh976bqydf1dqn5gz200cl3")))) (build-system node-build-system) - (arguments '(#:tests? #f)) ; No tests. + (arguments '(#:tests? #f ; No tests. + #:phases + (modify-phases %standard-phases + (delete 'build)))) (home-page "https://github.com/tlrobinson/long-stack-traces") (synopsis "Long stacktraces implemented in user-land JavaScript") (description "This package provides long stacktraces for V8 implemented in @@ -136,7 +149,10 @@ user-land JavaScript.") (base32 "034iaiq2pdqn342p2404cpz364g282d2hkp9375hysnh9i968wbb")))) (build-system node-build-system) - (arguments '(#:tests? #f)) ; No tests. + (arguments '(#:tests? #f ; No tests. + #:phases + (modify-phases %standard-phases + (delete 'build)))) (home-page "http://www.enchantedage.com/node-mersenne") (synopsis "Node.js module for generating Mersenne Twister random numbers") (description "Thix package provides a node.js port of the Mersenne Twister @@ -161,7 +177,11 @@ random number generator.") (base32 "0mqrcf0xi2jbwffwkk00cljpqfsri1jk8s6kz8jny45apn7zjds1")))) (build-system node-build-system) - (arguments '(#:tests? #f)) ; Tests run during build phase. + (arguments '(#:tests? #f ; Tests run during build phase. + #:phases + (modify-phases + %standard-phases + (delete 'build)))) (home-page "https://github.com/felixge/node-oop") (synopsis "Simple, light-weight oop module for Node") (description "This library tries to bring basic oop features to JavaScript @@ -189,11 +209,12 @@ while being as light-weight and simple as possible.") (arguments '(#:phases (modify-phases %standard-phases - (add-before 'check 'skip-intentionally-failing-test - (lambda _ - (substitute* "test/run.js" - (("far.include") "far.exclude(/test-parse.js/)\nfar.include")) - #t))))) + (delete 'build) + (add-before 'check 'skip-intentionally-failing-test + (lambda _ + (substitute* "test/run.js" + (("far.include") "far.exclude(/test-parse.js/)\nfar.include")) + #t))))) (native-inputs `(("node-far" ,node-far) ("node-long-stack-traces" ,node-long-stack-traces))) @@ -207,17 +228,20 @@ while being as light-weight and simple as possible.") (name "node-statsd-parser") (version "0.0.4") (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/dscape/statsd-parser") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "049rnczsd6pv6bk282q4w72bhqc5cs562djgr7yncy7lk0wzq5j3")))) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dscape/statsd-parser") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "049rnczsd6pv6bk282q4w72bhqc5cs562djgr7yncy7lk0wzq5j3")))) (build-system node-build-system) - (arguments '(#:tests? #f)) ; No tests. + (arguments '(#:tests? #f ; No tests. + #:phases + (modify-phases %standard-phases + (delete 'build)))) (home-page "https://github.com/dscape/statsd-parser") (synopsis "Streaming parser for the statsd protocol") (description "This package provides a streaming parser for the statsd @@ -239,7 +263,10 @@ protocol used in @code{node-lynx}.") (base32 "1rk94nl3qc7znsk8400bnga30v0m7j2mmvz9ldwjinxv1d3n11xc")))) (build-system node-build-system) - (arguments '(#:tests? #f)) ; No test suite. + (arguments '(#:tests? #f ; No tests. + #:phases + (modify-phases %standard-phases + (delete 'build)))) (home-page "https://github.com/TooTallNate/util-deprecate") (synopsis "Node.js `util.deprecate()` function with browser support") (description "This package provides the Node.js @code{util.deprecate()} @@ -261,7 +288,12 @@ function with browser support.") "06biknqb05r9xsmcflm3ygh50pjvdk84x6r79w43kmck4fn3qn5p")))) (build-system node-build-system) (arguments - `(#:tests? #f)) ;; FIXME: Tests depend on node-tap + '(#:tests? #f + #:phases + (modify-phases + %standard-phases + (delete 'configure) + (delete 'build)))) ;; FIXME: Tests depend on node-tap (home-page "https://github.com/npm/node-semver") (synopsis "Parses semantic versions strings") (description diff --git a/guix/build-system/node.scm b/guix/build-system/node.scm index 05c24c47d5..560f0ee4da 100644 --- a/guix/build-system/node.scm +++ b/guix/build-system/node.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 Jelle Licht +;;; Copyright © 2019 Timothy Sample ;;; ;;; This file is part of GNU Guix. ;;; @@ -17,32 +18,22 @@ ;;; along with GNU Guix. If not, see . (define-module (guix build-system node) - #:use-module (guix store) - #:use-module (guix build json) - #:use-module (guix build union) - #:use-module (guix utils) - #:use-module (guix packages) - #:use-module (guix derivations) - #:use-module (guix search-paths) #:use-module (guix build-system) #:use-module (guix build-system gnu) + #:use-module (guix derivations) + #:use-module (guix packages) + #:use-module (guix search-paths) + #:use-module (guix utils) #:use-module (ice-9 match) - #:export (npm-meta-uri - %node-build-system-modules + #:export (%node-build-system-modules node-build node-build-system)) -(define (npm-meta-uri name) - "Return a URI string for the metadata of node module NAME found in the npm -registry." - (string-append "https://registry.npmjs.org/" name)) - (define %node-build-system-modules ;; Build-side modules imported by default. `((guix build node-build-system) (guix build json) - (guix build union) - ,@%gnu-build-system-modules)) ;; TODO: Might be not needed + ,@%gnu-build-system-modules)) (define (default-node) "Return the default Node package." @@ -78,7 +69,7 @@ registry." (define* (node-build store name inputs #:key - (npm-flags ''()) + (test-target "test") (tests? #t) (phases '(@ (guix build node-build-system) %standard-phases)) @@ -88,8 +79,6 @@ registry." (guile #f) (imported-modules %node-build-system-modules) (modules '((guix build node-build-system) - (guix build json) - (guix build union) (guix build utils)))) "Build SOURCE using NODE and INPUTS." (define builder @@ -99,12 +88,10 @@ registry." #:source ,(match (assoc-ref inputs "source") (((? derivation? source)) (derivation->output-path source)) - ((source) - source) - (source - source)) + ((source) source) + (source source)) #:system ,system - #:npm-flags ,npm-flags + #:test-target ,test-target #:tests? ,tests? #:phases ,phases #:outputs %outputs @@ -131,5 +118,5 @@ registry." (define node-build-system (build-system (name 'node) - (description "The standard Node build system") + (description "The Node build system") (lower lower))) diff --git a/guix/build/node-build-system.scm b/guix/build/node-build-system.scm index 7799f03595..ecba27166b 100644 --- a/guix/build/node-build-system.scm +++ b/guix/build/node-build-system.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 David Thompson -;;; Copyright © 2016 Jelle Licht +;;; Copyright © 2016, 2020 Jelle Licht +;;; Copyright © 2019 Timothy Sample ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,144 +20,126 @@ (define-module (guix build node-build-system) #:use-module ((guix build gnu-build-system) #:prefix gnu:) - #:use-module (guix build json) - #:use-module (guix build union) #:use-module (guix build utils) + #:use-module (guix build json) + #:use-module (ice-9 ftw) #:use-module (ice-9 match) - #:use-module (ice-9 popen) - #:use-module (ice-9 regex) #:use-module (srfi srfi-1) - #:use-module (srfi srfi-26) #:export (%standard-phases node-build)) ;; Commentary: ;; -;; Builder-side code of the standard Node/npm package build procedure. +;; Builder-side code of the standard Node/NPM package install procedure. ;; ;; Code: -(define* (read-package-data #:key (filename "package.json")) - (call-with-input-file filename - (lambda (port) - (read-json port)))) +(define (set-home . _) + (with-directory-excursion ".." + (let loop ((i 0)) + (let ((dir (string-append "npm-home-" (number->string i)))) + (if (directory-exists? dir) + (loop (1+ i)) + (begin + (mkdir dir) + (setenv "HOME" (string-append (getcwd) "/" dir)) + (format #t "Set HOME to ~s~%" (getenv "HOME"))))))) + #t) -(define* (build #:key inputs #:allow-other-keys) - (define (build-from-package-json? package-file) - (let* ((package-data (read-package-data #:filename package-file)) - (scripts (assoc-ref package-data "scripts"))) - (assoc-ref scripts "build"))) - "Build a new node module using the appropriate build system." - ;; XXX: Develop a more robust heuristic, allow override - (cond ((file-exists? "gulpfile.js") - (invoke "gulp")) - ((file-exists? "gruntfile.js") - (invoke "grunt")) - ((file-exists? "Makefile") - (invoke "make")) - ((and (file-exists? "package.json") - (build-from-package-json? "package.json")) - (invoke "npm" "run" "build"))) +(define (module-name module) + (let* ((package.json (string-append module "/package.json")) + (package-meta (call-with-input-file package.json read-json))) + (assoc-ref package-meta "name"))) + +(define (index-modules input-paths) + (define (list-modules directory) + (append-map (lambda (x) + (if (string-prefix? "@" x) + (list-modules (string-append directory "/" x)) + (list (string-append directory "/" x)))) + (filter (lambda (x) + (not (member x '("." "..")))) + (or (scandir directory) '())))) + (let ((index (make-hash-table (* 2 (length input-paths))))) + (for-each (lambda (dir) + (let ((nm (string-append dir "/lib/node_modules"))) + (for-each (lambda (module) + (hash-set! index (module-name module) module)) + (list-modules nm)))) + input-paths) + index)) + +(define* (patch-dependencies #:key inputs #:allow-other-keys) + + (define index (index-modules (map cdr inputs))) + + (define (resolve-dependencies package-meta meta-key) + (fold (lambda (key+value acc) + (match key+value + ('@ acc) + ((key . value) (acons key (hash-ref index key value) acc)))) + '() + (or (assoc-ref package-meta meta-key) '()))) + + (with-atomic-file-replacement "package.json" + (lambda (in out) + (let ((package-meta (read-json in))) + (assoc-set! package-meta "dependencies" + (append + '(@) + (resolve-dependencies package-meta "dependencies") + (resolve-dependencies package-meta "peerDependencies"))) + (assoc-set! package-meta "devDependencies" + (append + '(@) + (resolve-dependencies package-meta "devDependencies"))) + (write-json package-meta out)))) #t) -(define* (link-npm-dependencies #:key inputs #:allow-other-keys) - (define (inputs->node-inputs inputs) - "Filter the directory part from INPUTS." - (filter (lambda (input) - (match input - ((name . _) (node-package? name)))) - inputs)) - (define (inputs->directories inputs) - "Extract the directory part from INPUTS." - (match inputs - (((names . directories) ...) - directories))) - (define (make-node-path root) - (string-append root "/lib/node_modules/")) - - (let ((input-node-directories (inputs->directories - (inputs->node-inputs inputs)))) - (union-build "node_modules" - (map make-node-path input-node-directories)) +(define* (configure #:key outputs inputs #:allow-other-keys) + (let ((npm (string-append (assoc-ref inputs "node") "/bin/npm"))) + (invoke npm "--offline" "--ignore-scripts" "install") #t)) -(define configure link-npm-dependencies) +(define* (build #:key inputs #:allow-other-keys) + (let ((npm (string-append (assoc-ref inputs "node") "/bin/npm"))) + (invoke npm "run" "build") + #t)) -(define* (check #:key tests? #:allow-other-keys) + +(define* (check #:key tests? inputs #:allow-other-keys) "Run 'npm test' if TESTS?" (if tests? - ;; Should only be enabled once we know that there are tests - (invoke "npm" "test")) + (let ((npm (string-append (assoc-ref inputs "node") "/bin/npm"))) + (invoke npm "test")) + (format #t "test suite not run~%")) #t) -(define (node-package? name) - "Check if NAME correspond to the name of an Node package." - (string-prefix? "node-" name)) +(define* (repack #:key inputs #:allow-other-keys) + (invoke "tar" "-czf" "../package.tgz" ".") + #t) (define* (install #:key outputs inputs #:allow-other-keys) - "Install the node module to the output store item. The module itself is -installed in a subdirectory of @file{node_modules} and its runtime dependencies -as defined by @file{package.json} are symlinked into a @file{node_modules} -subdirectory of the module's directory. Additionally, binaries are installed in -the @file{bin} directory." - (let* ((out (assoc-ref outputs "out")) - (target (string-append out "/lib")) - (binaries (string-append out "/bin")) - (data (read-package-data)) - (modulename (assoc-ref data "name")) - (binary-configuration (match (assoc-ref data "bin") - (('@ configuration ...) configuration) - ((? string? configuration) configuration) - (#f #f))) - (dependencies (match (assoc-ref data "dependencies") - (('@ deps ...) deps) - (#f #f)))) - (mkdir-p target) - (copy-recursively "." (string-append target "/node_modules/" modulename)) - ;; Remove references to dependencies - (delete-file-recursively - (string-append target "/node_modules/" modulename "/node_modules")) - (cond - ((string? binary-configuration) - (begin - (mkdir-p binaries) - (symlink (string-append target "/node_modules/" modulename "/" - binary-configuration) - (string-append binaries "/" modulename)))) - ((list? binary-configuration) - (for-each - (lambda (conf) - (match conf - ((key . value) - (begin - (mkdir-p (dirname (string-append binaries "/" key))) - (symlink (string-append target "/node_modules/" modulename "/" - value) - (string-append binaries "/" key)))))) - binary-configuration))) - (when dependencies - (mkdir-p - (string-append target "/node_modules/" modulename "/node_modules")) - (for-each - (lambda (dependency) - (let ((dependency (car dependency))) - (symlink - (string-append (assoc-ref inputs (string-append "node-" dependency)) - "/lib/node_modules/" dependency) - (string-append target "/node_modules/" modulename - "/node_modules/" dependency)))) - dependencies)) + "Install the node module to the output store item." + (let ((out (assoc-ref outputs "out")) + (npm (string-append (assoc-ref inputs "node") "/bin/npm"))) + (invoke npm "--prefix" out + "--global" + "--offline" + "--loglevel" "silly" + "--production" + "install" "../package.tgz") #t)) - (define %standard-phases (modify-phases gnu:%standard-phases + (add-after 'unpack 'set-home set-home) + (add-before 'configure 'patch-dependencies patch-dependencies) (replace 'configure configure) (replace 'build build) - (replace 'install install) - (delete 'check) - (add-after 'install 'check check) - (delete 'strip))) + (replace 'check check) + (add-before 'install 'repack repack) + (replace 'install install))) (define* (node-build #:key inputs (phases %standard-phases) #:allow-other-keys #:rest args) From patchwork Sat Mar 20 14:59:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jelle Licht X-Patchwork-Id: 27977 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 723AE27BC58; Sat, 20 Mar 2021 15:00:22 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4611927BC57 for ; Sat, 20 Mar 2021 15:00:22 +0000 (GMT) Received: from localhost ([::1]:51070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNd5R-0008RY-Cm for patchwork@mira.cbaines.net; Sat, 20 Mar 2021 11:00:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNd59-0008RC-CH for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41466) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNd59-0001Y4-41 for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNd59-0000NI-1a for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47282] [PATCH 02/13] gnu: Add libuv-node Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Mar 2021 15:00:02 +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: 47282@debbugs.gnu.org Received: via spool by 47282-submit@debbugs.gnu.org id=B47282.16162523711235 (code B ref 47282); Sat, 20 Mar 2021 15:00:02 +0000 Received: (at 47282) by debbugs.gnu.org; 20 Mar 2021 14:59:31 +0000 Received: from localhost ([127.0.0.1]:52978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4c-0000Jk-Ju for submit@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:30 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:47222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4a-0000JU-Se for 47282@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:29 -0400 From: Jelle Licht Date: Sat, 20 Mar 2021 15:59:14 +0100 Message-Id: <20210320145925.12500-2-jlicht@fsfe.org> In-Reply-To: <20210320145925.12500-1-jlicht@fsfe.org> References: <20210320145925.12500-1-jlicht@fsfe.org> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/libevent.scm (libuv-node): New variable. --- gnu/packages/libevent.scm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gnu/packages/libevent.scm b/gnu/packages/libevent.scm index 7109d9a88d..699d0705dd 100644 --- a/gnu/packages/libevent.scm +++ b/gnu/packages/libevent.scm @@ -134,6 +134,22 @@ resolution, asynchronous file system operations, and threading primitives.") ;; details. Documentation is CC-BY 4.0 as of 1.12.0; see 'LICENSE-docs'. (license (list expat cc-by4.0)))) +(define-public libuv-node + ;; When upgrading Node, also upgrade this. Get the version from + ;; https://github.com/nodejs/node/blob/master/deps/uv/include/uv/version.h + (package + (inherit libuv) + (name "libuv-node") + (version "1.40.0") + (source (origin + (method url-fetch) + (uri (string-append "https://dist.libuv.org/dist/v" version + "/libuv-v" version ".tar.gz")) + (sha256 + (base32 + "1551k3ab27vbg9517l9b4iqbramwxdkwgpf53knas05cbfwhvab1")))))) + + (define-public perl-anyevent (package (name "perl-anyevent") From patchwork Sat Mar 20 14:59:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jelle Licht X-Patchwork-Id: 27982 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6791B27BC57; Sat, 20 Mar 2021 15:00:49 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 38BEC27BC57 for ; Sat, 20 Mar 2021 15:00:49 +0000 (GMT) Received: from localhost ([::1]:51956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNd5s-0000RQ-BQ for patchwork@mira.cbaines.net; Sat, 20 Mar 2021 11:00:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42780) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNd5A-0008RM-Gz for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41468) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNd5A-0001aL-9Q for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNd5A-0000Nc-8Q for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47282] [PATCH 03/13] gnu: node: Use license prefix. Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Mar 2021 15:00:04 +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: 47282@debbugs.gnu.org Received: via spool by 47282-submit@debbugs.gnu.org id=B47282.16162523771308 (code B ref 47282); Sat, 20 Mar 2021 15:00:04 +0000 Received: (at 47282) by debbugs.gnu.org; 20 Mar 2021 14:59:37 +0000 Received: from localhost ([127.0.0.1]:52991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4j-0000Kv-CN for submit@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:37 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:47228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4c-0000Jb-CN for 47282@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:30 -0400 From: Jelle Licht Date: Sat, 20 Mar 2021 15:59:15 +0100 Message-Id: <20210320145925.12500-3-jlicht@fsfe.org> In-Reply-To: <20210320145925.12500-1-jlicht@fsfe.org> References: <20210320145925.12500-1-jlicht@fsfe.org> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/node.scm (node)[license]: Use prefix for license. --- gnu/packages/node.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index a0df3d2cad..82a2ca7ce0 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -26,7 +26,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages node) - #:use-module ((guix licenses) #:select (expat)) + #:use-module ((guix licenses) #:prefix license:) #:use-module ((guix build utils) #:select (alist-replace)) #:use-module (guix packages) #:use-module (guix derivations) @@ -207,7 +207,7 @@ 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 "https://nodejs.org/") - (license expat) + (license license:expat) (properties '((max-silent-time . 7200) ;2h, needed on ARM (timeout . 21600))))) ;6h From patchwork Sat Mar 20 14:59:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jelle Licht X-Patchwork-Id: 27981 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2CF6327BC58; Sat, 20 Mar 2021 15:00:48 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0E2E627BC57 for ; Sat, 20 Mar 2021 15:00:48 +0000 (GMT) Received: from localhost ([::1]:51834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNd5r-0000OE-6p for patchwork@mira.cbaines.net; Sat, 20 Mar 2021 11:00:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNd5B-0008RN-2p for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41469) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNd5A-0001az-Rq for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNd5A-0000Nj-Rn for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47282] [PATCH 04/13] gnu: node: Add node-bootstrap. Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Mar 2021 15:00:04 +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: 47282@debbugs.gnu.org Received: via spool by 47282-submit@debbugs.gnu.org id=B47282.16162523781315 (code B ref 47282); Sat, 20 Mar 2021 15:00:04 +0000 Received: (at 47282) by debbugs.gnu.org; 20 Mar 2021 14:59:38 +0000 Received: from localhost ([127.0.0.1]:52993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4j-0000L4-Mt for submit@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:37 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:47234) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4d-0000Jn-3s for 47282@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:31 -0400 From: Jelle Licht Date: Sat, 20 Mar 2021 15:59:16 +0100 Message-Id: <20210320145925.12500-4-jlicht@fsfe.org> In-Reply-To: <20210320145925.12500-1-jlicht@fsfe.org> References: <20210320145925.12500-1-jlicht@fsfe.org> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/node (node-bootstrap): Add hidden alias for node. --- gnu/packages/node.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index 82a2ca7ce0..9baf3719d7 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -211,6 +211,11 @@ devices.") (properties '((max-silent-time . 7200) ;2h, needed on ARM (timeout . 21600))))) ;6h +;; This should be the latest version of node that still builds without +;; depending on lltthp. +(define-public node-bootstrap + (hidden-package node)) + (define-public libnode (package/inherit node (name "libnode") From patchwork Sat Mar 20 14:59:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jelle Licht X-Patchwork-Id: 27979 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C45E927BC58; Sat, 20 Mar 2021 15:00:24 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 61BDD27BC57 for ; Sat, 20 Mar 2021 15:00:24 +0000 (GMT) Received: from localhost ([::1]:51112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNd5T-0008Tf-Ao for patchwork@mira.cbaines.net; Sat, 20 Mar 2021 11:00:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNd5C-0008Rw-88 for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41470) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNd5B-0001b6-FP for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNd5B-0000Nr-9k for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47282] [PATCH 05/13] gnu: node: Add node-semver-bootstrap. Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Mar 2021 15:00:05 +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: 47282@debbugs.gnu.org Received: via spool by 47282-submit@debbugs.gnu.org id=B47282.16162523781322 (code B ref 47282); Sat, 20 Mar 2021 15:00:05 +0000 Received: (at 47282) by debbugs.gnu.org; 20 Mar 2021 14:59:38 +0000 Received: from localhost ([127.0.0.1]:52995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4j-0000LA-TL for submit@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:38 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:47228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4d-0000Jb-Kj for 47282@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:32 -0400 From: Jelle Licht Date: Sat, 20 Mar 2021 15:59:17 +0100 Message-Id: <20210320145925.12500-5-jlicht@fsfe.org> In-Reply-To: <20210320145925.12500-1-jlicht@fsfe.org> References: <20210320145925.12500-1-jlicht@fsfe.org> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/node.scm (node-semver-bootstrap): New package. --- gnu/packages/node.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index 9baf3719d7..f332d33536 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -41,6 +41,7 @@ #:use-module (gnu packages icu4c) #:use-module (gnu packages libevent) #:use-module (gnu packages linux) + #:use-module (gnu packages node-xyz) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -216,6 +217,37 @@ devices.") (define-public node-bootstrap (hidden-package node)) +;; Duplicate of node-semver +(define-public node-semver-bootstrap + (package + (name "node-semver") + (version "7.2.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/npm/node-semver") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "06biknqb05r9xsmcflm3ygh50pjvdk84x6r79w43kmck4fn3qn5p")))) + (build-system node-build-system) + (arguments + `(#:node ,node-bootstrap + #:tests? #f + #:phases + (modify-phases + %standard-phases + (delete 'configure) + (delete 'build)))) + (home-page "https://github.com/npm/node-semver") + (properties '((hidden? . #t))) + (synopsis "Parses semantic versions strings") + (description + "@code{node-semver} is a JavaScript implementation of the +@uref{https://semver.org/, SemVer.org} specification.") + (license license:isc))) + (define-public libnode (package/inherit node (name "libnode") From patchwork Sat Mar 20 14:59:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jelle Licht X-Patchwork-Id: 27985 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4661827BC5A; Sat, 20 Mar 2021 15:01:19 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 01FCB27BC57 for ; Sat, 20 Mar 2021 15:01:19 +0000 (GMT) Received: from localhost ([::1]:52640 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNd6M-0000pa-32 for patchwork@mira.cbaines.net; Sat, 20 Mar 2021 11:01:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNd5C-0008Ry-Gb for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41471) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNd5B-0001b7-Ny for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNd5B-0000Nz-Nt for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47282] [PATCH 06/13] gnu: node: Add node-ms-bootstrap. Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Mar 2021 15:00:05 +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: 47282@debbugs.gnu.org Received: via spool by 47282-submit@debbugs.gnu.org id=B47282.16162523781331 (code B ref 47282); Sat, 20 Mar 2021 15:00:05 +0000 Received: (at 47282) by debbugs.gnu.org; 20 Mar 2021 14:59:38 +0000 Received: from localhost ([127.0.0.1]:52998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4k-0000LH-7K for submit@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:38 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:47244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4e-0000K9-ML for 47282@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:32 -0400 From: Jelle Licht Date: Sat, 20 Mar 2021 15:59:18 +0100 Message-Id: <20210320145925.12500-6-jlicht@fsfe.org> In-Reply-To: <20210320145925.12500-1-jlicht@fsfe.org> References: <20210320145925.12500-1-jlicht@fsfe.org> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/node.scm (node-ms-bootstrap): New package. --- gnu/packages/node.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index f332d33536..6cc8a2d0d1 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -31,8 +31,10 @@ #:use-module (guix packages) #:use-module (guix derivations) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix build-system gnu) + #:use-module (guix build-system node) #:use-module (gnu packages) #:use-module (gnu packages adns) #:use-module (gnu packages base) @@ -248,6 +250,37 @@ devices.") @uref{https://semver.org/, SemVer.org} specification.") (license license:isc))) +(define-public node-ms-bootstrap + (package + (name "node-ms") + (version "2.1.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/vercel/ms.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1pjxzbi4j8pinlsc7yxvfrh0b47kb2dc4lfc2rjq4wx5bdwl33fj")))) + (build-system node-build-system) + (arguments + `(#:node ,node-bootstrap + #:tests? #f + #:phases + (modify-phases + %standard-phases + (delete 'configure) + (delete 'build)))) + (home-page "https://github.com/zeit/ms#readme") + (properties '((hidden? . #t))) + (synopsis "Tiny millisecond conversion utility") + (description + "Use this package to easily convert various time formats to +milliseconds.") + (license license:expat))) + (define-public libnode (package/inherit node (name "libnode") From patchwork Sat Mar 20 14:59:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jelle Licht X-Patchwork-Id: 27980 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6E42B27BC5C; Sat, 20 Mar 2021 15:00:24 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0F35027BC58 for ; Sat, 20 Mar 2021 15:00:24 +0000 (GMT) Received: from localhost ([::1]:51096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNd5S-0008TF-TF for patchwork@mira.cbaines.net; Sat, 20 Mar 2021 11:00:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNd5C-0008Rz-Ga for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41472) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNd5C-0001bA-5h for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNd5C-0000O6-65 for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47282] [PATCH 07/13] gnu: node: Add node-binary-search-bootstrap. Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Mar 2021 15:00:06 +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: 47282@debbugs.gnu.org Received: via spool by 47282-submit@debbugs.gnu.org id=B47282.16162523791343 (code B ref 47282); Sat, 20 Mar 2021 15:00:06 +0000 Received: (at 47282) by debbugs.gnu.org; 20 Mar 2021 14:59:39 +0000 Received: from localhost ([127.0.0.1]:53000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4k-0000LQ-Kp for submit@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:39 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:47250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4f-0000KG-E4 for 47282@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:33 -0400 From: Jelle Licht Date: Sat, 20 Mar 2021 15:59:19 +0100 Message-Id: <20210320145925.12500-7-jlicht@fsfe.org> In-Reply-To: <20210320145925.12500-1-jlicht@fsfe.org> References: <20210320145925.12500-1-jlicht@fsfe.org> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/node.scm (node-binary-search-bootstrap): New package. --- gnu/packages/node.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index 6cc8a2d0d1..b7937b29f4 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -281,6 +281,38 @@ devices.") milliseconds.") (license license:expat))) +(define-public node-binary-search-bootstrap + (package + (name "node-binary-search") + (version "1.3.6") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/darkskyapp/binary-search.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1xr2msdc143cd3xwgq7n3rhzy7j8wrnaidxl0r6l6b6g3mpbpjig")))) + (build-system node-build-system) + (arguments + `(#:node ,node-bootstrap + #:tests? #f + #:phases + (modify-phases + %standard-phases + (delete 'configure) + (delete 'build)))) + (home-page + "https://github.com/darkskyapp/binary-search#readme") + (properties '((hidden? . #t))) + (synopsis + "Tiny binary search function with comparators") + (description + "This package is a binary search function for @code{Node.js}.") + (license license:cc0))) + (define-public libnode (package/inherit node (name "libnode") From patchwork Sat Mar 20 14:59:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jelle Licht X-Patchwork-Id: 27986 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 84D6827BC57; Sat, 20 Mar 2021 15:01:19 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 264B527BC58 for ; Sat, 20 Mar 2021 15:01:19 +0000 (GMT) Received: from localhost ([::1]:52642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNd6M-0000pb-A6 for patchwork@mira.cbaines.net; Sat, 20 Mar 2021 11:01:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNd5C-0008S5-SL for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41473) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNd5C-0001bK-JK for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNd5C-0000OE-J3 for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47282] [PATCH 08/13] gnu: node: Add node-debug-bootstrap. Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Mar 2021 15:00:06 +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: 47282@debbugs.gnu.org Received: via spool by 47282-submit@debbugs.gnu.org id=B47282.16162523791350 (code B ref 47282); Sat, 20 Mar 2021 15:00:06 +0000 Received: (at 47282) by debbugs.gnu.org; 20 Mar 2021 14:59:39 +0000 Received: from localhost ([127.0.0.1]:53002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4l-0000Lc-2s for submit@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:39 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:47228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4f-0000Jb-Sm for 47282@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:34 -0400 From: Jelle Licht Date: Sat, 20 Mar 2021 15:59:20 +0100 Message-Id: <20210320145925.12500-8-jlicht@fsfe.org> In-Reply-To: <20210320145925.12500-1-jlicht@fsfe.org> References: <20210320145925.12500-1-jlicht@fsfe.org> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/node.scm (node-debug-bootstrap): New package. --- gnu/packages/node.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index b7937b29f4..58e3fd1acc 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -313,6 +313,39 @@ milliseconds.") "This package is a binary search function for @code{Node.js}.") (license license:cc0))) +(define-public node-debug-bootstrap + (package + (name "node-debug") + (version "4.3.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/visionmedia/debug.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "08g52r1d4yqcsfdfb7n5if33d4cghaq75gx5n9hj6m6fd8jfp2pi")))) + (build-system node-build-system) + (arguments + `(#:node ,node-bootstrap + #:tests? #f + #:phases + (modify-phases + %standard-phases + (delete 'configure) + (delete 'build)))) + (inputs `(("node-ms" ,node-ms-bootstrap))) + (home-page + "https://github.com/visionmedia/debug#readme") + (properties '((hidden? . #t))) + (synopsis "Small debugging utility") + (description "This packages contains a tiny JavaScript debugging utility +modelled after @code{Node.js} core's debugging technique. It works in +@code{Node.js} and web browsers.") + (license license:expat))) + (define-public libnode (package/inherit node (name "libnode") From patchwork Sat Mar 20 14:59:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jelle Licht X-Patchwork-Id: 27987 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7264E27BC5A; Sat, 20 Mar 2021 15:01:46 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 197A327BC57 for ; Sat, 20 Mar 2021 15:01:46 +0000 (GMT) Received: from localhost ([::1]:53258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNd6n-00016K-6U for patchwork@mira.cbaines.net; Sat, 20 Mar 2021 11:01:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNd5D-0008So-On for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41474) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNd5D-0001bw-2A for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNd5D-0000OL-1V for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47282] [PATCH 09/13] gnu: node: Add node-llparse-builder-bootstrap. Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Mar 2021 15:00:06 +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: 47282@debbugs.gnu.org Received: via spool by 47282-submit@debbugs.gnu.org id=B47282.16162523791358 (code B ref 47282); Sat, 20 Mar 2021 15:00:06 +0000 Received: (at 47282) by debbugs.gnu.org; 20 Mar 2021 14:59:39 +0000 Received: from localhost ([127.0.0.1]:53004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4l-0000Lj-B9 for submit@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:39 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:47260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4g-0000Ka-U3 for 47282@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:35 -0400 From: Jelle Licht Date: Sat, 20 Mar 2021 15:59:21 +0100 Message-Id: <20210320145925.12500-9-jlicht@fsfe.org> In-Reply-To: <20210320145925.12500-1-jlicht@fsfe.org> References: <20210320145925.12500-1-jlicht@fsfe.org> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/node.scm (node-llparse-builder-bootstrap): New package. --- gnu/packages/node.scm | 71 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index 58e3fd1acc..85e57f5f2d 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -346,6 +346,77 @@ modelled after @code{Node.js} core's debugging technique. It works in @code{Node.js} and web browsers.") (license license:expat))) +(define-public node-llparse-builder-bootstrap + (package + (name "node-llparse-builder") + (version "1.5.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/indutny/llparse-builder.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0r82iiwqsb73k2fxw7842rjjiixllxpyc6yl9cq4ma6ybkf6xmzm")) + (modules '((guix build utils))) + (snippet + '(begin + ;; FIXME: Unneeded runtime dependency + ;; https://github.com/indutny/llparse-builder/pull/2 + (substitute* "package.json" + (("\"@types/debug.*,") "")) + ;; Fix incorrect import semantics + ;; https://github.com/evanw/esbuild/issues/477 + (substitute* (list + "src/node/invoke.ts" + "src/node/base.ts" + "src/node/consume.ts" + "src/node/match.ts" + "src/node/error.ts" + "src/node/pause.ts" + "src/edge.ts" + "src/utils.ts" + "src/loop-checker/index.ts" + "src/loop-checker/lattice.ts" + "src/code/field.ts" + "src/span-allocator.ts") + (("\\* as assert") "assert") + (("\\* as debugAPI") "debugAPI")) + #t)))) + (build-system node-build-system) + (arguments + `(#:node ,node-bootstrap + #:tests? #f + #:phases + (modify-phases + %standard-phases + (delete 'configure) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + (let ((esbuild (string-append + (assoc-ref inputs "esbuild") + "/bin/esbuild"))) + (invoke esbuild + "--platform=node" + "--outfile=lib/builder.js" + "--bundle" + "src/builder.ts"))))))) + (inputs + `(("node-binary-search" ,node-binary-search-bootstrap) + ("node-debug" ,node-debug-bootstrap))) + (native-inputs + `(("esbuild" ,esbuild))) + (home-page + "https://github.com/indutny/llparse-builder#readme") + (properties '((hidden? . #t))) + (synopsis + "Graph builder for consumption by @code{llparse}") + (description + "This package builds graphs for consumption by @code{llparse}.") + (license license:expat))) + (define-public libnode (package/inherit node (name "libnode") From patchwork Sat Mar 20 14:59:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jelle Licht X-Patchwork-Id: 27989 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D8A3E27BC58; Sat, 20 Mar 2021 15:01:52 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A288F27BC57 for ; Sat, 20 Mar 2021 15:01:52 +0000 (GMT) Received: from localhost ([::1]:53686 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNd6t-0001I4-RU for patchwork@mira.cbaines.net; Sat, 20 Mar 2021 11:01:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNd5E-0008Su-7i for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41475) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNd5D-0001cd-KV for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNd5D-0000OT-Ib for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47282] [PATCH 10/13] gnu: node: Add node-llparse-frontend-bootstrap. Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Mar 2021 15:00:07 +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: 47282@debbugs.gnu.org Received: via spool by 47282-submit@debbugs.gnu.org id=B47282.16162523801365 (code B ref 47282); Sat, 20 Mar 2021 15:00:07 +0000 Received: (at 47282) by debbugs.gnu.org; 20 Mar 2021 14:59:40 +0000 Received: from localhost ([127.0.0.1]:53006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4l-0000Lr-LS for submit@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:39 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:47266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4h-0000Kh-LX for 47282@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:35 -0400 From: Jelle Licht Date: Sat, 20 Mar 2021 15:59:22 +0100 Message-Id: <20210320145925.12500-10-jlicht@fsfe.org> In-Reply-To: <20210320145925.12500-1-jlicht@fsfe.org> References: <20210320145925.12500-1-jlicht@fsfe.org> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/node.scm (node-llparse-frontend-bootstrap): New package. --- gnu/packages/node.scm | 60 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index 85e57f5f2d..41c50e209e 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -417,6 +417,66 @@ modelled after @code{Node.js} core's debugging technique. It works in "This package builds graphs for consumption by @code{llparse}.") (license license:expat))) +(define-public node-llparse-frontend-bootstrap + (package + (name "node-llparse-frontend") + (version "3.0.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/indutny/llparse-frontend.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1rm9g4ifyip30svm5cgnf0gx7d45jgh4mpf2hkd092xhngmfvicc")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Fix incorrect import semantics + ;; https://github.com/evanw/esbuild/issues/477 + (substitute* (list "src/frontend.ts" + "src/code/field-value.ts" + "src/container/index.ts" + "src/container/wrap.ts" + "src/node/sequence.ts" + "src/node/single.ts" + "src/node/table-lookup.ts" + "src/trie/index.ts") + (("\\* as assert") "assert") + (("\\* as debugAPI") "debugAPI")) + #t)))) + (build-system node-build-system) + (arguments + `(#:node ,node-bootstrap + #:tests? #f + #:phases + (modify-phases + %standard-phases + (delete 'configure) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + (let ((esbuild (string-append + (assoc-ref inputs "esbuild") + "/bin/esbuild"))) + (invoke esbuild + "--platform=node" + "--outfile=lib/frontend.js" + "--bundle" + "src/frontend.ts"))))))) + (inputs + `(("node-debug" ,node-debug-bootstrap) + ("node-llparse-builder" ,node-llparse-builder-bootstrap))) + (native-inputs + `(("esbuild" ,esbuild))) + (home-page + "https://github.com/indutny/llparse-frontend#readme") + (properties '((hidden? . #t))) + (synopsis "Frontend for @code{llparse} compiler") + (description "This package is a frontend for the @code{llparse} +compiler.") + (license license:expat))) + (define-public libnode (package/inherit node (name "libnode") From patchwork Sat Mar 20 14:59:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jelle Licht X-Patchwork-Id: 27978 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 584D727BC5A; Sat, 20 Mar 2021 15:00:24 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id F3DC527BC57 for ; Sat, 20 Mar 2021 15:00:23 +0000 (GMT) Received: from localhost ([::1]:51110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNd5S-0008Te-UU for patchwork@mira.cbaines.net; Sat, 20 Mar 2021 11:00:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNd5E-0008Sv-8i for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41476) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNd5E-0001dD-1a for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNd5E-0000Oc-13 for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47282] [PATCH 11/13] gnu: node: Add node-llparse-bootstrap. Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Mar 2021 15:00:07 +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: 47282@debbugs.gnu.org Received: via spool by 47282-submit@debbugs.gnu.org id=B47282.16162523801371 (code B ref 47282); Sat, 20 Mar 2021 15:00:07 +0000 Received: (at 47282) by debbugs.gnu.org; 20 Mar 2021 14:59:40 +0000 Received: from localhost ([127.0.0.1]:53008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4m-0000Ly-0E for submit@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:40 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:47228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4i-0000Jb-3J for 47282@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:36 -0400 From: Jelle Licht Date: Sat, 20 Mar 2021 15:59:23 +0100 Message-Id: <20210320145925.12500-11-jlicht@fsfe.org> In-Reply-To: <20210320145925.12500-1-jlicht@fsfe.org> References: <20210320145925.12500-1-jlicht@fsfe.org> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/node.scm (node-llparse-bootstrap): New package. --- gnu/packages/node.scm | 62 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index 41c50e209e..380e959a58 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -477,6 +477,68 @@ modelled after @code{Node.js} core's debugging technique. It works in compiler.") (license license:expat))) +(define-public node-llparse-bootstrap + (package + (name "node-llparse") + (version "7.1.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/indutny/llparse.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "10da273iy2if88hp79cwms6c8qpsl1fkgzll6gmqyx5yxv5mkyp6")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Fix incorrect import semantics + ;; https://github.com/evanw/esbuild/issues/477 + (substitute* (list "src/compiler/index.ts" + "src/implementation/c/node/base.ts" + "src/implementation/c/node/table-lookup.ts" + "src/implementation/c/compilation.ts" + "src/implementation/c/helpers/match-sequence.ts" + "src/implementation/c/code/mul-add.ts") + (("\\* as assert") "assert") + (("\\* as debugAPI") "debugAPI")) + #t)))) + (build-system node-build-system) + (arguments + `(#:node ,node-bootstrap + #:tests? #f + #:phases + (modify-phases + %standard-phases + (delete 'configure) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + (let ((esbuild (string-append + (assoc-ref inputs "esbuild") + "/bin/esbuild"))) + (invoke esbuild + "--platform=node" + "--outfile=lib/api.js" + "--bundle" + "src/api.ts"))))))) + (inputs + `(("node-debug" ,node-debug-bootstrap) + ("node-llparse-frontend" + ,node-llparse-frontend-bootstrap))) + (native-inputs + `(("esbuild" ,esbuild))) + (home-page + "https://github.com/nodejs/llparse#readme") + (properties '((hidden? . #t))) + (synopsis + "Compile incremental parsers to C code") + (description + "This package offers an API for compiling an incremental parser +definition into a C output.") + (license license:expat))) + (define-public libnode (package/inherit node (name "libnode") From patchwork Sat Mar 20 14:59:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jelle Licht X-Patchwork-Id: 27988 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B291D27BC57; Sat, 20 Mar 2021 15:01:46 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3778127BC58 for ; Sat, 20 Mar 2021 15:01:46 +0000 (GMT) Received: from localhost ([::1]:53276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNd6n-00016o-EH for patchwork@mira.cbaines.net; Sat, 20 Mar 2021 11:01:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNd5F-0008TM-1q for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:10 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41477) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNd5E-0001dT-Fb for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNd5E-0000Oj-Dp for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47282] [PATCH 12/13] gnu: node: Add llhttp-bootstrap. Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Mar 2021 15:00:08 +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: 47282@debbugs.gnu.org Received: via spool by 47282-submit@debbugs.gnu.org id=B47282.16162523991400 (code B ref 47282); Sat, 20 Mar 2021 15:00:08 +0000 Received: (at 47282) by debbugs.gnu.org; 20 Mar 2021 14:59:59 +0000 Received: from localhost ([127.0.0.1]:53010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd55-0000MT-B9 for submit@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:59 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:47280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4j-0000Kt-4a for 47282@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:37 -0400 From: Jelle Licht Date: Sat, 20 Mar 2021 15:59:24 +0100 Message-Id: <20210320145925.12500-12-jlicht@fsfe.org> In-Reply-To: <20210320145925.12500-1-jlicht@fsfe.org> References: <20210320145925.12500-1-jlicht@fsfe.org> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/node.scm (llhttp-bootstrap): New package. --- gnu/packages/node.scm | 67 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index 380e959a58..d44bec7ca4 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -539,6 +539,73 @@ compiler.") definition into a C output.") (license license:expat))) +(define-public llhttp-bootstrap + (package + (name "llhttp") + (version "2.1.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/nodejs/llhttp.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "08ylnirqrk63h0ww1m79p0bh6rwayrhd4v28p353qlp3qcffwwb0")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Fix incorrect import semantics + ;; https://github.com/evanw/esbuild/issues/477 + (substitute* "src/llhttp/http.ts" + (("\\* as assert") + "assert")) + (substitute* "Makefile" + (("npx ts-node bin/generate.ts") + "node bin/generate.js")) + #t)))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no tests + #:make-flags (list "CLANG=gcc" + (string-append "DESTDIR=" (assoc-ref %outputs "out")) + "PREFIX=") + #:phases (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key inputs #:allow-other-keys) + (let ((esbuild (string-append + (assoc-ref inputs "esbuild") + "/bin/esbuild"))) + (invoke esbuild + "--platform=node" + "--outfile=bin/generate.js" + "--bundle" "bin/generate.ts")))) + (add-before 'install 'create-install-directories + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (for-each (lambda (dir) + (mkdir-p (string-append out dir))) + (list "/lib" "/include" "/src")) + #t))) + (add-after 'install 'install-src + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (src-dir (string-append out "/src"))) + (install-file "build/c/llhttp.c" src-dir) + #t)))))) + (native-inputs + `(("esbuild" ,esbuild) + ("node" ,node-bootstrap) + ("node-semver" ,node-semver-bootstrap) + ("node-llparse-bootstrap" ,node-llparse-bootstrap))) + (home-page "https://github.com/nodejs/llhttp") + (properties '((hidden? . #t))) + (synopsis "Port of @code{http_parser} to @code{llparse}") + (description "@code{llhttp} is a port of @code{http_parser} to TypeScript. +@code{llparse} is used to generate the output C source file, which can be +compiled and linked with the embedder's program (like @code{Node.js}).") + (license license:expat))) + (define-public libnode (package/inherit node (name "libnode") From patchwork Sat Mar 20 14:59:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jelle Licht X-Patchwork-Id: 27984 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2E95527BC58; Sat, 20 Mar 2021 15:01:18 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A4D6427BC57 for ; Sat, 20 Mar 2021 15:01:17 +0000 (GMT) Received: from localhost ([::1]:52564 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNd6K-0000nW-Nv for patchwork@mira.cbaines.net; Sat, 20 Mar 2021 11:01:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNd5F-0008TT-3R for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:10 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41478) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNd5E-0001db-RL for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNd5E-0000Or-R7 for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47282] [PATCH 13/13] gnu: node: Add node-lts Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Mar 2021 15:00:08 +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: 47282@debbugs.gnu.org Received: via spool by 47282-submit@debbugs.gnu.org id=B47282.16162524001406 (code B ref 47282); Sat, 20 Mar 2021 15:00:08 +0000 Received: (at 47282) by debbugs.gnu.org; 20 Mar 2021 15:00:00 +0000 Received: from localhost ([127.0.0.1]:53012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd55-0000MX-Oi for submit@debbugs.gnu.org; Sat, 20 Mar 2021 11:00:00 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:47286) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4j-0000L1-So for 47282@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:38 -0400 From: Jelle Licht Date: Sat, 20 Mar 2021 15:59:25 +0100 Message-Id: <20210320145925.12500-13-jlicht@fsfe.org> In-Reply-To: <20210320145925.12500-1-jlicht@fsfe.org> References: <20210320145925.12500-1-jlicht@fsfe.org> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/node.scm (node-lts): New package. wip --- gnu/packages/node.scm | 156 ++++++++++++++++++++++++++++++++++++- guix/build-system/node.scm | 2 +- 2 files changed, 153 insertions(+), 5 deletions(-) diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index d44bec7ca4..2a7e9ca2fa 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -542,7 +542,7 @@ definition into a C output.") (define-public llhttp-bootstrap (package (name "llhttp") - (version "2.1.0") + (version "2.2.1") (source (origin (method git-fetch) (uri (git-reference @@ -551,7 +551,7 @@ definition into a C output.") (file-name (git-file-name name version)) (sha256 (base32 - "08ylnirqrk63h0ww1m79p0bh6rwayrhd4v28p353qlp3qcffwwb0")) + "093ag8w0y8irsy0ph7sk06rrs03ic3is41wgxjkgwvc2qys9iqdr")) (modules '((guix build utils))) (snippet '(begin @@ -566,7 +566,7 @@ definition into a C output.") #t)))) (build-system gnu-build-system) (arguments - `(#:tests? #f ; no tests + `(#:tests? #f ; no tests #:make-flags (list "CLANG=gcc" (string-append "DESTDIR=" (assoc-ref %outputs "out")) "PREFIX=") @@ -592,6 +592,8 @@ definition into a C output.") (let* ((out (assoc-ref outputs "out")) (src-dir (string-append out "/src"))) (install-file "build/c/llhttp.c" src-dir) + (install-file "src/native/api.c" src-dir) + (install-file "src/native/http.c" src-dir) #t)))))) (native-inputs `(("esbuild" ,esbuild) @@ -599,13 +601,159 @@ definition into a C output.") ("node-semver" ,node-semver-bootstrap) ("node-llparse-bootstrap" ,node-llparse-bootstrap))) (home-page "https://github.com/nodejs/llhttp") - (properties '((hidden? . #t))) + ;; (properties '((hidden? . #t))) (synopsis "Port of @code{http_parser} to @code{llparse}") (description "@code{llhttp} is a port of @code{http_parser} to TypeScript. @code{llparse} is used to generate the output C source file, which can be compiled and linked with the embedder's program (like @code{Node.js}).") (license license:expat))) +(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=system-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=" prefix) + configure-flags))) + (format #t "build directory: ~s~%" (getcwd)) + (format #t "configure flags: ~s~%" flags) + ;; Node's configure script expects the CC environment variable to + ;; be set. + (setenv "CC" (string-append (assoc-ref inputs "gcc") "/bin/gcc")) + (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-spawnsync-shell.js" + "test/parallel/test-stdio-closed.js" + "test/sequential/test-child-process-emfile.js") + (("'/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.js") + (("'/usr/bin/env'") + (string-append "'" (which "env") "'"))) + ;; Because we have a custom version of llhttp, we should expect a superset of supported http methods. + (substitute* '("test/parallel/test-http-methods.js") + (("assert\\.deepStrictEqual\\(http\\.METHODS, methods\\.sort\\(\\)\\);") + "methods.every(v => assert(http.METHODS.includes(v)));")) + + ;; 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")) + + ;; This requires a DNS resolver. + (for-each delete-file + '("test/parallel/test-dns.js" + "test/parallel/test-dns-lookupService-promises.js")) + + ;; TODO: why does this fail. It seems to _almost_ pass, but it parses 1 byte? + (delete-file "test/parallel/test-http-server-destroy-socket-on-client-error.js") + + ;; TODO: this seems to fail because of spawning processes? + (delete-file "test/parallel/test-fs-write-sigxfsz.js") + + ;; FIXME: This test fails randomly: + ;; https://github.com/nodejs/node/issues/31213 + (delete-file "test/parallel/test-net-listen-after-destroying-stdin.js") + + ;; FIXME: These tests fail on armhf-linux: + ;; https://github.com/nodejs/node/issues/31970 + ,@(if (string-prefix? "arm" (%current-system)) + '((for-each delete-file + '("test/parallel/test-zlib.js" + "test/parallel/test-zlib-brotli.js" + "test/parallel/test-zlib-brotli-flush.js" + "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 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")) + + ;; Replace pre-generated llhttp sources + (let ((llhttp (assoc-ref inputs "llhttp")) + ;; (llhttp-src (assoc-ref inputs "llhttp-sources")) + ) + (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-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 560f0ee4da..5737c8ea6e 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))) (define* (lower name #:key source inputs native-inputs outputs system target