diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-04-15 00:10:22 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-04-15 00:32:18 +0200 |
commit | b0a6a9713076347c14ee2dd0ea494ab086df2a82 (patch) | |
tree | 683306fb642f1974aafb720f6e2798598380d272 /guix/store.scm | |
parent | cc44fbb8d9f47070c488faef3dc4b24f2a8a07d8 (diff) | |
download | gnu-guix-b0a6a9713076347c14ee2dd0ea494ab086df2a82.tar gnu-guix-b0a6a9713076347c14ee2dd0ea494ab086df2a82.tar.gz |
substitute: Honor the number of columns of the client terminal.
* guix/store.scm (set-build-options): Add #:terminal-columns parameter
and honor it.
* guix/scripts/substitute.scm (client-terminal-columns): New procedure.
(guix-substitute): Use it to parameterize 'current-terminal-columns'.
Diffstat (limited to 'guix/store.scm')
-rw-r--r-- | guix/store.scm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/guix/store.scm b/guix/store.scm index 906611658e..af311a0ebd 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -22,6 +22,7 @@ #:use-module (guix serialization) #:use-module (guix monads) #:autoload (guix base32) (bytevector->base32-string) + #:autoload (guix build syscalls) (terminal-columns) #:use-module (rnrs bytevectors) #:use-module (rnrs io ports) #:use-module (srfi srfi-1) @@ -530,7 +531,10 @@ encoding conversion errors." ;; the daemon's settings are used. Otherwise, it ;; overrides the daemons settings; see 'guix ;; substitute'. - (substitute-urls #f)) + (substitute-urls #f) + + ;; Number of columns in the client's terminal. + (terminal-columns (terminal-columns))) ;; Must be called after `open-connection'. (define socket @@ -565,6 +569,10 @@ encoding conversion errors." ,@(if rounds `(("build-repeat" . ,(number->string (max 0 (1- rounds))))) + '()) + ,@(if terminal-columns + `(("terminal-columns" + . ,(number->string terminal-columns))) '())))) (send (string-pairs pairs)))) (let loop ((done? (process-stderr server))) |