guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/04: utils: Turn 'parallel-job-count' into a parameter.


From: Ludovic Courtès
Subject: 04/04: utils: Turn 'parallel-job-count' into a parameter.
Date: Sat, 22 Nov 2014 20:57:25 +0000

civodul pushed a commit to branch core-updates
in repository guix.

commit 1d1fa9327c839bf7af92dd38d8306df0d456c11e
Author: Ludovic Courtès <address@hidden>
Date:   Sat Nov 22 21:57:05 2014 +0100

    utils: Turn 'parallel-job-count' into a parameter.
    
    * guix/build/utils.scm (parallel-job-count): Turn into a SRFI-39 parameter.
---
 guix/build/utils.scm |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index c4c3934..a3050b9 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."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]