3
4
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00

guix build: Parameterize '%graft?' upfront.

* guix/scripts/build.scm (guix-build): Add 'graft?' variable and
parameterize %GRAFT?.
This commit is contained in:
Ludovic Courtès 2020-03-05 15:52:37 +01:00
parent c5a3d8f646
commit f42f39ad68
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -943,13 +943,21 @@ needed."
(parse-command-line args %options
(list %default-options)))
(define graft?
(assoc-ref opts 'graft?))
(with-error-handling
(with-status-verbosity (assoc-ref opts 'verbosity)
(with-store store
;; Set the build options before we do anything else.
(set-build-options-from-command-line store opts)
(parameterize ((current-terminal-columns (terminal-columns)))
(parameterize ((current-terminal-columns (terminal-columns))
;; Set grafting upfront in case the user's input
;; depends on it (e.g., a manifest or code snippet that
;; calls 'gexp->derivation').
(%graft? graft?))
(let* ((mode (assoc-ref opts 'build-mode))
(drv (options->derivations store opts))
(urls (map (cut string-append <> "/log")