mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
build-system/node: Add guile-json extension.
* guix/build-system/node.scm (default-guile-json): New variable. (node-build): Use guile-json extension. Signed-off-by: Jelle Licht <jlicht@fsfe.org> Change-Id: I68eb291410fc4943395c876ba702360b4cd7be4f
This commit is contained in:
parent
3e9e164154
commit
7cc5ddf763
1 changed files with 23 additions and 15 deletions
|
@ -80,6 +80,12 @@
|
|||
(build node-build)
|
||||
(arguments (strip-keyword-arguments private-keywords arguments)))))
|
||||
|
||||
(define (default-guile-json)
|
||||
"Return the default guile-json package."
|
||||
;; Lazily resolve the binding to avoid a circular dependency.
|
||||
(let ((mod (resolve-interface '(gnu packages guile))))
|
||||
(module-ref mod 'guile-json-4)))
|
||||
|
||||
(define* (node-build name inputs
|
||||
#:key
|
||||
source
|
||||
|
@ -91,11 +97,13 @@
|
|||
(search-paths '())
|
||||
(system (%current-system))
|
||||
(guile #f)
|
||||
(guile-json (default-guile-json))
|
||||
(imported-modules %node-build-system-modules)
|
||||
(modules '((guix build node-build-system)
|
||||
(guix build utils))))
|
||||
"Build SOURCE using NODE and INPUTS."
|
||||
(define builder
|
||||
(with-extensions (list guile-json)
|
||||
(with-imported-modules imported-modules
|
||||
#~(begin
|
||||
(use-modules #$@(sexp->gexp modules))
|
||||
|
@ -110,7 +118,7 @@
|
|||
#:search-paths '#$(sexp->gexp
|
||||
(map search-path-specification->sexp
|
||||
search-paths))
|
||||
#:inputs #$(input-tuples->gexp inputs)))))
|
||||
#:inputs #$(input-tuples->gexp inputs))))))
|
||||
|
||||
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
|
||||
system #:graft? #f)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue