summaryrefslogtreecommitdiff
path: root/guix/scripts/package.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2018-09-04 17:32:27 +0200
committerRicardo Wurmus <rekado@elephly.net>2018-09-09 23:18:21 +0200
commit15cc7e6adfa503a1cf168d19a952fae02f91ab2d (patch)
treed02b0b8681aca627a3fc494fd253e5a6465da7a7 /guix/scripts/package.scm
parent80ec1b73d2ca9745ea3b056bbfcecf3c33a4de5f (diff)
downloadgnu-guix-15cc7e6adfa503a1cf168d19a952fae02f91ab2d.tar
gnu-guix-15cc7e6adfa503a1cf168d19a952fae02f91ab2d.tar.gz
ui: Add soft port for styling and filtering build output.
* guix/ui.scm (build-output-port): New procedure. * guix/scripts/package.scm (%default-options): Print build trace. (guix-package): Use build-output-port. * guix/scripts/build.scm (guix-build): Use build-output-port. Co-authored-by: Sahithi Yarlagadda <sahi@swecha.net>
Diffstat (limited to 'guix/scripts/package.scm')
-rw-r--r--guix/scripts/package.scm39
1 files changed, 23 insertions, 16 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 97bcc699d9..73cbccba3b 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -329,7 +329,8 @@ ENTRIES, a list of manifest entries, in the context of PROFILE."
`((verbosity . 0)
(graft? . #t)
(substitutes? . #t)
- (build-hook? . #t)))
+ (build-hook? . #t)
+ (print-build-trace? . #t)))
(define (show-help)
(display (G_ "Usage: guix package [OPTION]...
@@ -930,18 +931,24 @@ processed, #f otherwise."
(arg-handler arg result)
(leave (G_ "~A: extraneous argument~%") arg)))
- (let ((opts (parse-command-line args %options (list %default-options #f)
- #:argument-handler handle-argument)))
- (with-error-handling
- (or (process-query opts)
- (parameterize ((%store (open-connection))
- (%graft? (assoc-ref opts 'graft?)))
- (set-build-options-from-command-line (%store) opts)
-
- (parameterize ((%guile-for-build
- (package-derivation
- (%store)
- (if (assoc-ref opts 'bootstrap?)
- %bootstrap-guile
- (canonical-package guile-2.2)))))
- (process-actions (%store) opts)))))))
+ (define opts
+ (parse-command-line args %options (list %default-options #f)
+ #:argument-handler handle-argument))
+ (define verbose?
+ (assoc-ref opts 'verbose?))
+
+ (with-error-handling
+ (or (process-query opts)
+ (parameterize ((%store (open-connection))
+ (%graft? (assoc-ref opts 'graft?)))
+ (set-build-options-from-command-line (%store) opts)
+
+ (parameterize ((%guile-for-build
+ (package-derivation
+ (%store)
+ (if (assoc-ref opts 'bootstrap?)
+ %bootstrap-guile
+ (canonical-package guile-2.2))))
+ (current-build-output-port
+ (build-output-port #:verbose? verbose?)))
+ (process-actions (%store) opts))))))