summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-04-09 19:01:21 +0200
committerLudovic Courtès <ludo@gnu.org>2013-04-09 19:01:21 +0200
commit068cdcd07c59ab8228c7c5580f6fd162069e3999 (patch)
treec4547332662db60d79634e1494c866f11dfe0a6b
parent6be960c7f7f8538024f5807dcd5b6a8a7562baf1 (diff)
downloadguix-068cdcd07c59ab8228c7c5580f6fd162069e3999.tar.gz
build-system/gnu: Fix search path computation with implicit inputs.
Reported by Andreas Enge <andreas@enge.fr>.

* guix/build-system/gnu.scm (standard-packages): New procedure.
  (standard-inputs): Use it instead of resolving things locally.
  (gnu-build)[implicit-search-paths]: Map over (standard-packages), not
  over STANDARD-INPUTS.
-rw-r--r--guix/build-system/gnu.scm14
1 files changed, 10 insertions, 4 deletions
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index d5ad1e3e01..3b3d99b313 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -135,6 +135,14 @@ use `--strip-all' as the arguments to `strip'."
   ;; Store passed to STANDARD-INPUTS.
   (make-parameter #f))
 
+(define (standard-packages)
+  "Return the list of (NAME PACKAGE OUTPUT) or (NAME PACKAGE) tuples of
+standard packages used as implicit inputs of the GNU build system."
+
+  ;; Resolve (gnu packages base) lazily to hide circular dependency.
+  (let ((distro (resolve-module '(gnu packages base))))
+    (module-ref distro '%final-inputs)))
+
 (define standard-inputs
   (memoize
    (lambda (system)
@@ -148,9 +156,7 @@ System: GCC, GNU Make, Bash, Coreutils, etc."
            (z
             (error "invalid standard input" z)))
 
-          ;; Resolve (gnu packages base) lazily to hide circular dependency.
-          (let* ((distro (resolve-module '(gnu packages base)))
-                 (inputs (module-ref distro '%final-inputs)))
+          (let ((inputs (standard-packages)))
             (append inputs
                     (append-map (match-lambda
                                  ((name package _ ...)
@@ -203,7 +209,7 @@ which could lead to gratuitous input divergence."
                       (package-native-search-paths p))
                      (_
                       '()))
-                    implicit-inputs)
+                    (standard-packages))
         '()))
 
   (define builder