summaryrefslogtreecommitdiff
path: root/guix/store.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-02-27 19:17:10 +0100
committerLudovic Courtès <ludo@gnu.org>2014-02-27 22:24:02 +0100
commit371e87d28646590345ad439fbceb99d9019d396c (patch)
tree42e198ad431843363566f8d8e52c5f9887653215 /guix/store.scm
parent7dc68701da58061bedbb0bfe49a11f7076399683 (diff)
store: Use 'when' instead of 'if' in effectful context.
* guix/store.scm (set-build-options): Use 'when' instead of 'if'.
Diffstat (limited to 'guix/store.scm')
-rw-r--r--guix/store.scm32
1 files changed, 16 insertions, 16 deletions
diff --git a/guix/store.scm b/guix/store.scm
index 8e88c5f86d..54ed31cbbc 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -452,22 +452,22 @@ encoding conversion errors."
(send (boolean keep-failed?) (boolean keep-going?)
(boolean fallback?) (integer verbosity)
(integer max-build-jobs) (integer max-silent-time))
- (if (>= (nix-server-minor-version server) 2)
- (send (boolean use-build-hook?)))
- (if (>= (nix-server-minor-version server) 4)
- (send (integer build-verbosity) (integer log-type)
- (boolean print-build-trace)))
- (if (>= (nix-server-minor-version server) 6)
- (send (integer build-cores)))
- (if (>= (nix-server-minor-version server) 10)
- (send (boolean use-substitutes?)))
- (if (>= (nix-server-minor-version server) 12)
- (send (string-list (fold-right (lambda (pair result)
- (match pair
- ((h . t)
- (cons* h t result))))
- '()
- binary-caches))))
+ (when (>= (nix-server-minor-version server) 2)
+ (send (boolean use-build-hook?)))
+ (when (>= (nix-server-minor-version server) 4)
+ (send (integer build-verbosity) (integer log-type)
+ (boolean print-build-trace)))
+ (when (>= (nix-server-minor-version server) 6)
+ (send (integer build-cores)))
+ (when (>= (nix-server-minor-version server) 10)
+ (send (boolean use-substitutes?)))
+ (when (>= (nix-server-minor-version server) 12)
+ (send (string-list (fold-right (lambda (pair result)
+ (match pair
+ ((h . t)
+ (cons* h t result))))
+ '()
+ binary-caches))))
(let loop ((done? (process-stderr server)))
(or done? (process-stderr server)))))