From 068cdcd07c59ab8228c7c5580f6fd162069e3999 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 9 Apr 2013 19:01:21 +0200 Subject: build-system/gnu: Fix search path computation with implicit inputs. Reported by Andreas Enge . * 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. --- guix/build-system/gnu.scm | 14 ++++++++++---- 1 file 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 -- cgit v1.2.3