aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-11-22 21:57:05 +0100
committerLudovic Courtès <ludo@gnu.org>2014-11-22 21:57:05 +0100
commit1d1fa9327c839bf7af92dd38d8306df0d456c11e (patch)
treee84169748ec68fc688415877ba97088e26e2314f
parente8c7fdda5d62af08820794114e02a6f247fed2f7 (diff)
downloadguix-1d1fa9327c839bf7af92dd38d8306df0d456c11e.tar
guix-1d1fa9327c839bf7af92dd38d8306df0d456c11e.tar.gz
utils: Turn 'parallel-job-count' into a parameter.
* guix/build/utils.scm (parallel-job-count): Turn into a SRFI-39 parameter.
-rw-r--r--guix/build/utils.scm14
1 files changed, 7 insertions, 7 deletions
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index c4c3934a5d..a3050b955c 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -73,13 +73,13 @@
(or (getenv "NIX_STORE")
"/gnu/store"))
-(define (parallel-job-count)
- "Return the number of processes to be passed next to GNU Make's `-j'
-argument."
- (match (getenv "NIX_BUILD_CORES") ;set by the daemon
- (#f 1)
- ("0" (current-processor-count))
- (x (or (string->number x) 1))))
+(define parallel-job-count
+ ;; Number of processes to be passed next to GNU Make's `-j' argument.
+ (make-parameter
+ (match (getenv "NIX_BUILD_CORES") ;set by the daemon
+ (#f 1)
+ ("0" (current-processor-count))
+ (x (or (string->number x) 1)))))
(define (directory-exists? dir)
"Return #t if DIR exists and is a directory."