diff options
Diffstat (limited to 'build-aux/build-self.scm')
-rw-r--r-- | build-aux/build-self.scm | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm index 02822a2ee8..0e7fc2907d 100644 --- a/build-aux/build-self.scm +++ b/build-aux/build-self.scm @@ -241,7 +241,8 @@ interface (FFI) of Guile.") (define* (build-program source version #:optional (guile-version (effective-version)) - #:key (pull-version 0) (channel-metadata #f)) + #:key (pull-version 0) (channel-metadata #f) + (graft? #t)) "Return a program that computes the derivation to build Guix from SOURCE." (define select? ;; Select every module but (guix config) and non-Guix modules. @@ -316,6 +317,8 @@ interface (FFI) of Guile.") (read-disable 'positions)) (use-modules (guix store) + (guix grafts) + (guix monads) (guix self) (guix derivations) (srfi srfi-1)) @@ -348,12 +351,14 @@ interface (FFI) of Guile.") (%make-void-port "w")) (current-build-output-port sock)) (run-with-store store - (guix-derivation source version - #$guile-version - #:channel-metadata - '#$channel-metadata - #:pull-version - #$pull-version) + (mbegin %store-monad + (set-grafting #$graft?) + (guix-derivation source version + #$guile-version + #:channel-metadata + '#$channel-metadata + #:pull-version + #$pull-version)) #:system system)) derivation-file-name)))))) #:module-path (list source)))) @@ -398,6 +403,7 @@ Display a spinner when nothing happens." #:key verbose? (version (date-version-string)) channel-metadata system + (graft? #t) (pull-version 0) ;; For the standalone Guix, default to Guile 3.0. For old @@ -415,7 +421,8 @@ files." ;; SOURCE. (mlet %store-monad ((build (build-program source version guile-version #:channel-metadata channel-metadata - #:pull-version pull-version)) + #:pull-version pull-version + #:graft? graft?)) (system (if system (return system) (current-system))) (home -> (getenv "HOME")) |