summaryrefslogtreecommitdiff
path: root/gnu/packages/bootstrap.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/bootstrap.scm')
-rw-r--r--gnu/packages/bootstrap.scm34
1 files changed, 19 insertions, 15 deletions
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index ee713db0cf..c6e3c697e6 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -33,6 +33,7 @@
#:use-module ((guix derivations)
#:select (derivation derivation-input derivation->output-path))
#:use-module ((guix utils) #:select (gnu-triplet->nix-system))
+ #:use-module ((guix gexp) #:select (lower-object))
#:use-module (guix memoization)
#:use-module (guix i18n)
#:use-module (srfi srfi-1)
@@ -167,19 +168,22 @@ for system '~a'")
("patch" ,%bootstrap-coreutils&co)))
(let ((orig-method (origin-method source)))
- (origin (inherit source)
- (method (cond ((eq? orig-method url-fetch)
- (boot url-fetch))
- (else 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))))))
+ (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)
@@ -345,8 +349,8 @@ or false to signal an error."
#:allow-other-keys)
(define (->store file)
(run-with-store store
- (origin->derivation (bootstrap-executable file system)
- system)))
+ (lower-object (bootstrap-executable file system)
+ system)))
(let* ((tar (->store "tar"))
(xz (->store "xz"))