summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-07-01 17:32:03 +0200
committerLudovic Courtès <ludo@gnu.org>2012-07-05 00:14:40 +0200
commit3e43c64a74cc48553a723bc14f17578f585502e2 (patch)
tree8c9263d54663965946c27f573b8dd2e5b4eff5fe
parentb0e0d0e99fab04fc374061adc7386b0f3f4b18c5 (diff)
downloadguix-3e43c64a74cc48553a723bc14f17578f585502e2.tar.gz
build-system/gnu: Make the builder's module list a parameter.
* guix/build-system/gnu.scm (gnu-build): Add a `modules' keyword
  parameter; use it.
-rw-r--r--guix/build-system/gnu.scm9
1 files changed, 5 insertions, 4 deletions
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index acda54e9e7..0f931dc582 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -44,12 +44,14 @@
 (define* (gnu-build store name source inputs
                     #:key (outputs '("out")) (configure-flags ''())
                     (make-flags ''()) (phases '%standard-phases)
-                    (system (%current-system)))
+                    (system (%current-system))
+                    (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."
   (define builder
     `(begin
-       (use-modules (guix build gnu-build-system))
+       (use-modules ,@modules)
        (gnu-build #:source ,(if (derivation-path? source)
                                 (derivation-path->output-path source)
                                 source)
@@ -65,8 +67,7 @@ input derivation INPUTS, using the usual procedure of the GNU Build System."
                                   ,@inputs
                                   ,@%standard-inputs)
                                 #:outputs outputs
-                                #:modules '((guix build gnu-build-system)
-                                            (guix build utils))))
+                                #:modules modules))
 
 (define gnu-build-system
   (build-system (name 'gnu)