[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#51838] [PATCH v2 18/26] guix: node-build-system: Add optional #:lib
From: |
Philip McGrath |
Subject: |
[bug#51838] [PATCH v2 18/26] guix: node-build-system: Add optional #:libuv? argument. |
Date: |
Fri, 19 Nov 2021 23:33:58 -0500 |
* guix/build-system/node.scm (lower): Add an optional #:libuv?
argument to tell the build system to add the version of libuv
used as an input to the #:node package as an additional implicit
input, so that packages needing libuv always get the correct version.
---
guix/build-system/node.scm | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/guix/build-system/node.scm b/guix/build-system/node.scm
index 75ae34508f..f83a7f64ce 100644
--- a/guix/build-system/node.scm
+++ b/guix/build-system/node.scm
@@ -1,6 +1,8 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Jelle Licht <jlicht@fsfe.org>
;;; Copyright © 2019 Timothy Sample <samplet@ngyro.com>
+;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
+;;; Copyright © 2021 Philip McGrath <philip@philipmcgrath.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -44,12 +46,13 @@ (define (default-node)
(define* (lower name
#:key source inputs native-inputs outputs system target
(node (default-node))
+ (libuv? #f)
(absent-dependencies ''())
#:allow-other-keys
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:node #:inputs #:native-inputs))
+ '(#:source #:target #:node #:libuv? #:inputs #:native-inputs))
(and (not target) ;XXX: no cross-compilation
(bag
@@ -59,10 +62,18 @@ (define private-keywords
`(("source" ,source))
'())
,@inputs
-
;; Keep the standard inputs of 'gnu-build-system'.
,@(standard-packages)))
(build-inputs `(("node" ,node)
+ ;; Many packages with native addons need
+ ;; libuv headers. The libuv version must
+ ;; be exactly the same as for the node
+ ;; package we are adding implicitly,
+ ;; so we take care of adding libuv, too.
+ ,@(if libuv?
+ `(("libuv" ,@(assoc-ref (package-inputs node)
+ "libuv")))
+ '())
,@native-inputs))
(outputs outputs)
(build node-build)
--
2.32.0
- [bug#51838] [PATCH v2 09/26] gnu: node-debug-bootstrap: Use #:absent-dependencies., (continued)
- [bug#51838] [PATCH v2 09/26] gnu: node-debug-bootstrap: Use #:absent-dependencies., Philip McGrath, 2021/11/19
- [bug#51838] [PATCH v2 19/26] gnu: Add node-inherits., Philip McGrath, 2021/11/19
- [bug#51838] [PATCH v2 15/26] gnu: node-once: Use #:absent-dependencies., Philip McGrath, 2021/11/19
- [bug#51838] [PATCH v2 13/26] gnu: node-semver: Use #:absent-dependencies., Philip McGrath, 2021/11/19
- [bug#51838] [PATCH v2 10/26] gnu: node-llparse-builder-bootstrap: Use #:absent-dependencies., Philip McGrath, 2021/11/19
- [bug#51838] [PATCH v2 10/26] gnu: node-llparse-builder-bootstrap: Use #:absent-dependencies., Liliana Marie Prikler, 2021/11/20
- [bug#51838] [PATCH v2 10/26] gnu: node-llparse-builder-bootstrap: Use #:absent-dependencies., Philip McGrath, 2021/11/20
- [bug#51838] [PATCH v2 10/26] gnu: node-llparse-builder-bootstrap: Use #:absent-dependencies., Jelle Licht, 2021/11/23
- [bug#51838] [PATCH v2 20/26] gnu: Add node-safe-buffer., Philip McGrath, 2021/11/19
- [bug#51838] [PATCH v2 12/26] gnu: node-llparse-bootstrap: Use #:absent-dependencies., Philip McGrath, 2021/11/19
- [bug#51838] [PATCH v2 18/26] guix: node-build-system: Add optional #:libuv? argument.,
Philip McGrath <=
- [bug#51838] [PATCH v2 18/26] guix: node-build-system: Add optional #:libuv? argument., Liliana Marie Prikler, 2021/11/20
- [bug#51838] [PATCH v2 18/26] guix: node-build-system: Add optional #:libuv? argument., Philip McGrath, 2021/11/20
- [bug#51838] [PATCH v2 14/26] gnu: node-wrappy: Use #:absent-dependencies., Philip McGrath, 2021/11/19
- [bug#51838] [PATCH v2 21/26] gnu: Add node-string-decoder., Philip McGrath, 2021/11/19
- [bug#51838] [PATCH v2 22/26] gnu: Add node-readable-stream., Philip McGrath, 2021/11/19
- [bug#51838] [PATCH v2 24/26] gnu: Add node-openzwave-shared., Philip McGrath, 2021/11/19
- [bug#51838] [PATCH v2 25/26] gnu: Add node-addon-api., Philip McGrath, 2021/11/19
- [bug#51838] [PATCH v2 17/26] gnu: node-irc: Use #:absent-dependencies., Philip McGrath, 2021/11/19
- [bug#51838] [PATCH v2 26/26] gnu: Add node-sqlite3., Philip McGrath, 2021/11/19
- [bug#51838] [PATCH v2 26/26] gnu: Add node-sqlite3., Liliana Marie Prikler, 2021/11/20