From b272c47433f7de3f5c16a81f4be9b3a8f899f11c Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 25 Oct 2012 18:03:48 +0200 Subject: derivations: Pass the derivation of guile-for-build to `imported-files' & co. * guix/derivations.scm (%guile-for-build): Initialize to #f. (imported-files, imported-modules, compiled-modules): Add `guile' keyword parameter. Pass it down to `build-expression->derivation'. (build-expression->derivation)[guile-drv]: New variable. Pass it as the #:guile parameter for `imported-modules' and `compiled-modules'. * tests/derivations.scm: Set %GUILE-FOR-BUILD to the derivation of %BOOTSTRAP-GUILE. --- tests/derivations.scm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') diff --git a/tests/derivations.scm b/tests/derivations.scm index a0cca9386b..0a785f1b2a 100644 --- a/tests/derivations.scm +++ b/tests/derivations.scm @@ -21,6 +21,8 @@ #:use-module (guix derivations) #:use-module (guix store) #:use-module (guix utils) + #:use-module ((guix packages) #:select (package-derivation)) + #:use-module ((distro packages base) #:select (%bootstrap-guile)) #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) @@ -36,6 +38,11 @@ (define %store (false-if-exception (open-connection))) +(when %store + ;; By default, use %BOOTSTRAP-GUILE for the current system. + (let ((drv (package-derivation %store %bootstrap-guile))) + (%guile-for-build drv))) + (define (directory-contents dir) "Return an alist representing the contents of DIR." (define prefix-len (string-length dir)) -- cgit v1.2.3