mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-26 14:28:15 -05:00
self: Limit the number of threads used when translating manuals.
* guix/self.scm (translate-texi-manuals)[build](parallel-jobs): New variable. Use it as first argument to 'n-par-for-each'.
This commit is contained in:
parent
977eb5d023
commit
98750a9d99
1 changed files with 8 additions and 2 deletions
|
@ -400,6 +400,12 @@ (define (available-translations directory domain)
|
|||
(find-files directory
|
||||
"\\.[a-z]{2}(_[A-Z]{2})?\\.po$")))
|
||||
|
||||
(define parallel-jobs
|
||||
;; Limit thread creation by 'n-par-for-each'. Going beyond can
|
||||
;; lead libgc 8.0.4 to abort with:
|
||||
;; mmap(PROT_NONE) failed
|
||||
(min (parallel-job-count) 4))
|
||||
|
||||
(mkdir #$output)
|
||||
(copy-recursively #$documentation "."
|
||||
#:log (%make-void-port "w"))
|
||||
|
@ -415,14 +421,14 @@ (define (available-translations directory domain)
|
|||
(setenv "LC_ALL" "en_US.UTF-8")
|
||||
(setlocale LC_ALL "en_US.UTF-8")
|
||||
|
||||
(n-par-for-each (parallel-job-count)
|
||||
(n-par-for-each parallel-jobs
|
||||
(match-lambda
|
||||
((language . po)
|
||||
(translate-texi "guix" po language
|
||||
#:extras '("contributing"))))
|
||||
(available-translations "." "guix-manual"))
|
||||
|
||||
(n-par-for-each (parallel-job-count)
|
||||
(n-par-for-each parallel-jobs
|
||||
(match-lambda
|
||||
((language . po)
|
||||
(translate-texi "guix-cookbook" po language)))
|
||||
|
|
Loading…
Reference in a new issue