summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-10-17 23:55:38 +0200
committerLudovic Courtès <ludo@gnu.org>2012-10-18 23:18:38 +0200
commitd6e877768821da5859d0c5774d4cea57941fde8b (patch)
tree82716ec6ef9f763da314fc300d7fade588cf7056 /guix
parentd14ecda913be98151f9c92f5f35e88cdb3457580 (diff)
downloadguix-patches-d6e877768821da5859d0c5774d4cea57941fde8b.tar
guix-patches-d6e877768821da5859d0c5774d4cea57941fde8b.tar.gz
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.
Diffstat (limited to 'guix')
-rw-r--r--guix/ftp.scm20
-rw-r--r--guix/http.scm21
2 files changed, 37 insertions, 4 deletions
diff --git a/guix/ftp.scm b/guix/ftp.scm
index 79bae6ece6..2717bf3fb3 100644
--- a/guix/ftp.scm
+++ b/guix/ftp.scm
@@ -17,7 +17,10 @@
;;; along with Guix. If not, see <ftp://www.gnu.org/licenses/>.
(define-module (guix ftp)
+ #: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 (ftp-fetch))
@@ -29,7 +32,7 @@
(define* (ftp-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,11 +42,24 @@ a different file name."
(use-modules (guix build ftp))
(ftp-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 ftp-client)
(guix build ftp)
- (guix build utils))))
+ (guix build utils))
+ #:guile-for-build guile-for-build))
+
;;; ftp.scm ends here
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 <http://www.gnu.org/licenses/>.
(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