~ruther/guix-local

111111d04662bb9056c8b56d11e634dc4506ee1e — Ludovic Courtès 13 years ago f03da4a
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'.
1 files changed, 11 insertions(+), 2 deletions(-)

M guix/build-system/gnu.scm
M guix/build-system/gnu.scm => guix/build-system/gnu.scm +11 -2
@@ 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