mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-17 04:07:10 -05:00
utils: Turn 'parallel-job-count' into a parameter.
* guix/build/utils.scm (parallel-job-count): Turn into a SRFI-39 parameter.
This commit is contained in:
parent
e8c7fdda5d
commit
1d1fa9327c
1 changed files with 7 additions and 7 deletions
|
@ -73,13 +73,13 @@ (define (%store-directory)
|
|||
(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."
|
||||
(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))))
|
||||
(x (or (string->number x) 1)))))
|
||||
|
||||
(define (directory-exists? dir)
|
||||
"Return #t if DIR exists and is a directory."
|
||||
|
|
Loading…
Reference in a new issue