summaryrefslogtreecommitdiff
path: root/guix/channels.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-04-08 13:00:50 +0200
committerMarius Bakke <mbakke@fastmail.com>2020-04-08 13:00:50 +0200
commit27783023993f9272ce422868d14529159c4a5218 (patch)
tree9013b08aa39e497b1fd8e01a05254278d83f0ff7 /guix/channels.scm
parentbe1e842ad78ac6c52fc7790f4a3ffd716673c111 (diff)
parentba6f2bda18ed19fa486a9c3e2c3baea6c66c6867 (diff)
downloadguix-patches-27783023993f9272ce422868d14529159c4a5218.tar
guix-patches-27783023993f9272ce422868d14529159c4a5218.tar.gz
Merge branch 'master' into core-updates
Conflicts: etc/news.scm gnu/local.mk gnu/packages/check.scm gnu/packages/cross-base.scm gnu/packages/gimp.scm gnu/packages/java.scm gnu/packages/mail.scm gnu/packages/sdl.scm gnu/packages/texinfo.scm gnu/packages/tls.scm gnu/packages/version-control.scm
Diffstat (limited to 'guix/channels.scm')
-rw-r--r--guix/channels.scm19
1 files changed, 17 insertions, 2 deletions
diff --git a/guix/channels.scm b/guix/channels.scm
index f0261dc2da..785b97722e 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -349,6 +349,15 @@ to '%package-module-path'."
(((predicate . guile) rest ...)
(if (predicate source) (guile) (loop rest))))))
+(define (with-trivial-build-handler mvalue)
+ "Run MVALUE, a monadic value, with a \"trivial\" build handler installed
+that unconditionally resumes the continuation."
+ (lambda (store)
+ (with-build-handler (lambda (continue . _)
+ (continue #t))
+ (values (run-with-store store mvalue)
+ store))))
+
(define* (build-from-source name source
#:key core verbose? commit
(dependencies '()))
@@ -381,8 +390,14 @@ package modules under SOURCE using CORE, an instance of Guix."
(mbegin %store-monad
(mwhen guile
(set-guile-for-build guile))
- (build source #:verbose? verbose? #:version commit
- #:pull-version %pull-version)))
+
+ ;; BUILD is usually quite costly. Install a "trivial" build handler
+ ;; so we don't bounce an outer build-accumulator handler that could
+ ;; cause us to redo half of the BUILD computation several times just
+ ;; to realize it gives the same result.
+ (with-trivial-build-handler
+ (build source #:verbose? verbose? #:version commit
+ #:pull-version %pull-version))))
;; Build a set of modules that extend Guix using the standard method.
(standard-module-derivation name source core dependencies)))