summaryrefslogtreecommitdiff
path: root/guix/build-system/node.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/build-system/node.scm')
-rw-r--r--guix/build-system/node.scm21
1 files changed, 7 insertions, 14 deletions
diff --git a/guix/build-system/node.scm b/guix/build-system/node.scm
index 73a6f152dd..ae799d1f4e 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 <jlicht@fsfe.org>
+;;; Copyright © 2019 Timothy Sample <samplet@ngyro.com>
;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
@@ -18,7 +19,6 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (guix build-system node)
- #:use-module (guix store)
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix gexp)
@@ -27,28 +27,21 @@
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
#: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."
;; 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
@@ -80,6 +73,7 @@ registry."
#:key
source
(npm-flags ''())
+ (test-target "test")
(tests? #t)
(phases '%standard-phases)
(outputs '("out"))
@@ -88,8 +82,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
@@ -100,6 +92,7 @@ registry."
#:source #+source
#:system #$system
#:npm-flags #$npm-flags
+ #:test-target #$test-target
#:tests? #$tests?
#:phases #$phases
#:outputs #$(outputs->gexp outputs)
@@ -117,5 +110,5 @@ registry."
(define node-build-system
(build-system
(name 'node)
- (description "The standard Node build system")
+ (description "The Node build system")
(lower lower)))