diff options
author | Marius Bakke <mbakke@fastmail.com> | 2018-06-11 23:52:15 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2018-06-11 23:52:15 +0200 |
commit | a032b4454b3fc67e11e9fc2d8c2345288065fa29 (patch) | |
tree | c208124b79dbd2224b68c52106aa72ff2ebfa7ab /build-aux/build-self.scm | |
parent | b5724230fed2d043206df20d12a45bb962b7ee77 (diff) | |
parent | 6321ce42ab4d9ab788d858cb19bde4aa7a0e3ecc (diff) | |
download | guix-patches-a032b4454b3fc67e11e9fc2d8c2345288065fa29.tar guix-patches-a032b4454b3fc67e11e9fc2d8c2345288065fa29.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'build-aux/build-self.scm')
-rw-r--r-- | build-aux/build-self.scm | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm index bccb7a959e..5898b6515c 100644 --- a/build-aux/build-self.scm +++ b/build-aux/build-self.scm @@ -184,7 +184,8 @@ person's version identifier." (date->string (current-date 0) "~Y~m~d.~H")) (define* (build-program source version - #:optional (guile-version (effective-version))) + #:optional (guile-version (effective-version)) + #:key (pull-version 0)) "Return a program that computes the derivation to build Guix from SOURCE." (define select? ;; Select every module but (guix config) and non-Guix modules. @@ -253,11 +254,14 @@ person's version identifier." (spin system))) (display - (derivation-file-name + (and=> (run-with-store store (guix-derivation #$source #$version - #$guile-version) - #:system system))))))) + #$guile-version + #:pull-version + #$pull-version) + #:system system) + derivation-file-name)))))) #:module-path (list source)))) ;; The procedure below is our return value. @@ -266,13 +270,15 @@ person's version identifier." (guile-version (match ((@ (guile) version)) ("2.2.2" "2.2.2") (_ (effective-version)))) + (pull-version 0) #:allow-other-keys #:rest rest) "Return a derivation that unpacks SOURCE into STORE and compiles Scheme files." ;; Build the build program and then use it as a trampoline to build from ;; SOURCE. - (mlet %store-monad ((build (build-program source version guile-version)) + (mlet %store-monad ((build (build-program source version guile-version + #:pull-version pull-version)) (system (if system (return system) (current-system)))) (mbegin %store-monad (show-what-to-build* (list build)) @@ -292,6 +298,9 @@ files." (return (newline (current-output-port))) ((store-lift add-temp-root) drv) (return (read-derivation-from-file drv)))) + ("#f" + ;; Unsupported PULL-VERSION. + (return #f)) ((? string? str) (error "invalid build result" (list build str)))))))) |