aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-10-31 17:53:59 +0100
committerLudovic Courtès <ludo@gnu.org>2012-10-31 17:53:59 +0100
commit111111d04662bb9056c8b56d11e634dc4506ee1e (patch)
treed4dcdc473e8ad0cddefe056f703b882fc4a68ff6 /guix
parentf03da4a0086a937409d07b27b3dac3b2e60cc0d4 (diff)
downloadgnu-guix-111111d04662bb9056c8b56d11e634dc4506ee1e.tar
gnu-guix-111111d04662bb9056c8b56d11e634dc4506ee1e.tar.gz
build-system/gnu: Distinguish between imported modules and used modules.
* guix/build-system/gnu.scm (gnu-build): Add the `imported-modules' keyword parameter. Pass it to `build-expression->derivation'.
Diffstat (limited to 'guix')
-rw-r--r--guix/build-system/gnu.scm13
1 files changed, 11 insertions, 2 deletions
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index c67ec52342..994b386e5c 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -120,12 +120,21 @@ System: GCC, GNU Make, Bash, Coreutils, etc."
(phases '%standard-phases)
(system (%current-system))
(implicit-inputs? #t) ; useful when bootstrapping
+ (imported-modules '((guix build gnu-build-system)
+ (guix build utils)))
(modules '((guix build gnu-build-system)
(guix build utils))))
"Return a derivation called NAME that builds from tarball SOURCE, with
input derivation INPUTS, using the usual procedure of the GNU Build
System. The builder is run with GUILE, or with the distro's final Guile
-package if GUILE is #f or omitted."
+package if GUILE is #f or omitted.
+
+The builder is run in a context where MODULES are used; IMPORTED-MODULES
+specifies modules not provided by Guile itself that must be imported in
+the builder's environment, from the host. Note that we distinguish
+between both, because for Guile's own modules like (ice-9 foo), we want
+to use GUILE's own version of it, rather than import the user's one,
+which could lead to gratuitous input divergence."
(define builder
`(begin
(use-modules ,@modules)
@@ -170,7 +179,7 @@ package if GUILE is #f or omitted."
(standard-inputs system))
'()))
#:outputs outputs
- #:modules modules
+ #:modules imported-modules
#:guile-for-build guile-for-build))
(define gnu-build-system