build-system/composer: Do not import host-side Guile-JSON modules.
Importing host-side (json …) modules would make builds dependent on the Guile-JSON version currently installed by the user. Use ‘with-extensions’ instead. * guix/build-system/composer.scm (%composer-build-system-modules): Remove (json …) modules. (composer-build)[guile-json]: New variable. [builder]: Wrap body in ‘with-extensions’. Change-Id: Ibe565572d60481b31292d73c6fa23d42aa3ceecb
This commit is contained in:
parent
9dab758791
commit
6454788a5c
1 changed files with 29 additions and 28 deletions
|
@ -62,10 +62,6 @@
|
||||||
;; Build-side modules imported by default.
|
;; Build-side modules imported by default.
|
||||||
`((guix build composer-build-system)
|
`((guix build composer-build-system)
|
||||||
(guix build union)
|
(guix build union)
|
||||||
(json)
|
|
||||||
(json builder)
|
|
||||||
(json parser)
|
|
||||||
(json record)
|
|
||||||
,@%gnu-build-system-modules))
|
,@%gnu-build-system-modules))
|
||||||
|
|
||||||
(define* (lower name
|
(define* (lower name
|
||||||
|
@ -124,7 +120,12 @@
|
||||||
(guix build utils))))
|
(guix build utils))))
|
||||||
"Build SOURCE using PHP, and with INPUTS. This assumes that SOURCE provides
|
"Build SOURCE using PHP, and with INPUTS. This assumes that SOURCE provides
|
||||||
a 'composer.json' file as its build system."
|
a 'composer.json' file as its build system."
|
||||||
|
(define guile-json
|
||||||
|
(module-ref (resolve-interface '(gnu packages guile))
|
||||||
|
'guile-json-4))
|
||||||
|
|
||||||
(define builder
|
(define builder
|
||||||
|
(with-extensions (list guile-json)
|
||||||
(with-imported-modules imported-modules
|
(with-imported-modules imported-modules
|
||||||
#~(begin
|
#~(begin
|
||||||
(use-modules #$@(sexp->gexp modules))
|
(use-modules #$@(sexp->gexp modules))
|
||||||
|
@ -148,7 +149,7 @@ a 'composer.json' file as its build system."
|
||||||
#:patch-shebangs? #$patch-shebangs?
|
#:patch-shebangs? #$patch-shebangs?
|
||||||
#:strip-binaries? #$strip-binaries?
|
#:strip-binaries? #$strip-binaries?
|
||||||
#:strip-flags #$strip-flags
|
#:strip-flags #$strip-flags
|
||||||
#:strip-directories #$strip-directories)))))
|
#:strip-directories #$strip-directories))))))
|
||||||
|
|
||||||
(gexp->derivation name builder
|
(gexp->derivation name builder
|
||||||
#:system system
|
#:system system
|
||||||
|
|
Reference in a new issue