From d6e877768821da5859d0c5774d4cea57941fde8b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 17 Oct 2012 23:55:38 +0200 Subject: distro: Use the bootstrap Guile for the derivation of sources. * distro/packages/base.scm (bootstrap-origin, package-with-bootstrap-guile): New procedures. (gnu-make-boot0, diffutils-boot0, findutils-boot0, binutils-boot0, gcc-boot0, linux-libre-headers-boot0, glibc-final, bash-final, guile-final): Use `package-with-bootstrap-guile'. (gcc-boot0-wrapped): Clear `source'. * guix/ftp.scm (ftp-fetch): Add a #:guile keyword parameter. Honor it. * guix/http.scm (http-fetch): Likewise. --- guix/http.scm | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'guix/http.scm') diff --git a/guix/http.scm b/guix/http.scm index 97ed3983f1..182d011b77 100644 --- a/guix/http.scm +++ b/guix/http.scm @@ -17,7 +17,10 @@ ;;; along with Guix. If not, see . (define-module (guix http) + #:use-module (ice-9 match) #:use-module (guix derivations) + #:use-module (guix packages) + #:use-module ((guix store) #:select (derivation-path?)) #:use-module (guix utils) #:export (http-fetch)) @@ -29,7 +32,7 @@ (define* (http-fetch store url hash-algo hash #:optional name - #:key (system (%current-system))) + #:key (system (%current-system)) guile) "Return the path of a fixed-output derivation in STORE that fetches URL, which is expected to have hash HASH of type HASH-ALGO (a symbol). By default, the file name is the base name of URL; optionally, NAME can specify @@ -39,8 +42,22 @@ a different file name." (use-modules (guix build http)) (http-fetch ,url %output))) + (define guile-for-build + (match guile + ((? package?) + (package-derivation store guile system)) + ((and (? string?) (? derivation-path?)) + guile) + (#f ; the default + (let* ((distro (resolve-interface '(distro packages base))) + (guile (module-ref distro 'guile-final))) + (package-derivation store guile system))))) + (build-expression->derivation store (or name (basename url)) system builder '() #:hash-algo hash-algo #:hash hash - #:modules '((guix build http)))) + #:modules '((guix build http)) + #:guile-for-build guile-for-build)) + +;;; http.scm ends here -- cgit v1.2.3