diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-11-15 20:11:35 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-11-15 20:11:35 +0100 |
commit | f056553c6b8ffa36f4ce9fb1c3602a8f4b1de242 (patch) | |
tree | 80c815216a3717cf00b615c9cb8840c113eaf79f /gnu/packages/bootstrap.scm | |
parent | 2c9d34166983565120f831284df57a07e2edd2f9 (diff) | |
parent | 528b52390d216d8a8cd13dfcd1e6e40a6448e6c2 (diff) |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/bootstrap.scm')
-rw-r--r-- | gnu/packages/bootstrap.scm | 69 |
1 files changed, 35 insertions, 34 deletions
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm index c6e3c697e6..d6995f104c 100644 --- a/gnu/packages/bootstrap.scm +++ b/gnu/packages/bootstrap.scm @@ -149,41 +149,42 @@ for system '~a'") ;;; Helper procedures. ;;; -(define (bootstrap-origin source) - "Return a variant of SOURCE, an <origin> instance, whose method uses +(define bootstrap-origin + (mlambdaq (source) + "Return a variant of SOURCE, an <origin> instance, whose method uses %BOOTSTRAP-GUILE to do its job." - (define (boot fetch) - (lambda* (url hash-algo hash - #:optional name #:key system) - (fetch url hash-algo hash name - #:guile %bootstrap-guile - #:system system))) - - (define %bootstrap-patch-inputs - ;; Packages used when an <origin> has a non-empty 'patches' field. - `(("tar" ,%bootstrap-coreutils&co) - ("xz" ,%bootstrap-coreutils&co) - ("bzip2" ,%bootstrap-coreutils&co) - ("gzip" ,%bootstrap-coreutils&co) - ("patch" ,%bootstrap-coreutils&co))) - - (let ((orig-method (origin-method source))) - (if (or (not (null? (origin-patches source))) - (origin-snippet source)) - (origin (inherit source) - (method (if (eq? orig-method url-fetch) - (boot url-fetch) - orig-method)) - (patch-guile %bootstrap-guile) - (patch-inputs %bootstrap-patch-inputs) - - ;; Patches can be origins as well, so process them. - (patches (map (match-lambda - ((? origin? patch) - (bootstrap-origin patch)) - (patch patch)) - (origin-patches source)))) - source))) + (define (boot fetch) + (lambda* (url hash-algo hash + #:optional name #:key system) + (fetch url hash-algo hash name + #:guile %bootstrap-guile + #:system system))) + + (define %bootstrap-patch-inputs + ;; Packages used when an <origin> has a non-empty 'patches' field. + `(("tar" ,%bootstrap-coreutils&co) + ("xz" ,%bootstrap-coreutils&co) + ("bzip2" ,%bootstrap-coreutils&co) + ("gzip" ,%bootstrap-coreutils&co) + ("patch" ,%bootstrap-coreutils&co))) + + (let ((orig-method (origin-method source))) + (if (or (not (null? (origin-patches source))) + (origin-snippet source)) + (origin (inherit source) + (method (if (eq? orig-method url-fetch) + (boot url-fetch) + orig-method)) + (patch-guile %bootstrap-guile) + (patch-inputs %bootstrap-patch-inputs) + + ;; Patches can be origins as well, so process them. + (patches (map (match-lambda + ((? origin? patch) + (bootstrap-origin patch)) + (patch patch)) + (origin-patches source)))) + source)))) (define* (package-from-tarball name source program-to-test description #:key snippet) |