diff options
author | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2023-09-22 23:54:34 +0200 |
---|---|---|
committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2023-09-22 23:54:34 +0200 |
commit | cdbd81ce144f17644ceebd3d08723aa244696a05 (patch) | |
tree | f2d4c484a5a8880fb32b81ac4330842c88a53e2a /guix/self.scm | |
parent | 10664c0f1c351eae24629127d97fe23f5e18a93c (diff) | |
parent | ec130e1a1b7f3b87b1a6e626754f7e7a07f6b717 (diff) |
Merge branch 'master' into emacs-team
Diffstat (limited to 'guix/self.scm')
-rw-r--r-- | guix/self.scm | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/guix/self.scm b/guix/self.scm index 81a36e007f..b8b9b9fe37 100644 --- a/guix/self.scm +++ b/guix/self.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017-2023 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net> +;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -1210,7 +1211,8 @@ containing MODULE-FILES and possibly other files as well." '((guix build compile) (guix build utils))) #~(begin - (use-modules (srfi srfi-26) + (use-modules (srfi srfi-1) + (srfi srfi-26) (ice-9 match) (ice-9 format) (ice-9 threads) @@ -1243,13 +1245,23 @@ containing MODULE-FILES and possibly other files as well." (* 100. (/ completed total)) total) (force-output)) - (define (process-directory directory files output) - ;; Hide compilation warnings. - (parameterize ((current-warning-port (%make-void-port "w"))) - (compile-files directory #$output files - #:workers (parallel-job-count) - #:report-load report-load - #:report-compilation report-compilation))) + (define* (process-directory directory files output #:key (size 25)) + (let ((chunks (unfold + (lambda (seed) (< (length seed) size)) ;p + (cute take <> size) ;f + (cute drop <> size) ;g + files ;seed + list))) ;tail + (for-each + (lambda (chunk) + ;; Hide compilation warnings. + (parameterize ((current-warning-port (%make-void-port "w"))) + (compile-files directory output chunk + #:workers (parallel-job-count) + #:report-load report-load + #:report-compilation report-compilation) + (gc))) + chunks))) (setvbuf (current-output-port) 'line) (setvbuf (current-error-port) 'line) @@ -1277,7 +1289,8 @@ containing MODULE-FILES and possibly other files as well." (mkdir #$output) (chdir #+module-tree) - (process-directory "." '#+module-files #$output) + (let ((size (if (equal? #$name "guix-packages-base") 10 25))) + (process-directory "." '#+module-files #$output #:size size)) (newline)))) (computed-file name build |