mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
pull: Add (guix build compile) to the mix.
Fixes <https://bugs.gnu.org/28956>. Reported by Leo Famulari <leo@famulari.name>. * build-aux/build-self.scm (build): Add (guix build compile) to #:modules. * guix/build/pull.scm (build-guix): Wrap 'compile-files' call in 'with-directory-excursion'. Strip "./" from FILES when passing it to 'compile-files'.
This commit is contained in:
parent
7a04dddd26
commit
ce33c3af76
2 changed files with 31 additions and 21 deletions
|
@ -245,6 +245,7 @@ (define builder
|
|||
(gexp->derivation "guix-latest" builder
|
||||
#:modules '((guix build pull)
|
||||
(guix build utils)
|
||||
(guix build compile)
|
||||
|
||||
;; Closure of (guix modules).
|
||||
(guix modules)
|
||||
|
|
|
@ -121,31 +121,40 @@ (define* (build-guix out source
|
|||
|
||||
;; Compile the .scm files. Filter out files depending on Guile-SSH when
|
||||
;; Guile-SSH is missing.
|
||||
(let ((files (filter has-all-its-dependencies?
|
||||
(all-scheme-files out))))
|
||||
(compile-files out out files
|
||||
(with-directory-excursion out
|
||||
(let ((files (filter has-all-its-dependencies?
|
||||
(all-scheme-files "."))))
|
||||
(compile-files out out
|
||||
|
||||
#:workers (parallel-job-count)
|
||||
;; XXX: 'compile-files' except ready-to-use relative
|
||||
;; file names.
|
||||
(map (lambda (file)
|
||||
(if (string-prefix? "./" file)
|
||||
(string-drop file 2)
|
||||
file))
|
||||
files)
|
||||
|
||||
;; Disable warnings.
|
||||
#:warning-options '()
|
||||
#:workers (parallel-job-count)
|
||||
|
||||
#:report-load
|
||||
(lambda (file total completed)
|
||||
(display #\cr log-port)
|
||||
(format log-port
|
||||
"loading...\t~5,1f% of ~d files" ;FIXME: i18n
|
||||
(* 100. (/ completed total)) total)
|
||||
(force-output log-port)
|
||||
(format debug-port "~%loading '~a'...~%" file))
|
||||
;; Disable warnings.
|
||||
#:warning-options '()
|
||||
|
||||
#:report-compilation
|
||||
(lambda (file total completed)
|
||||
(display #\cr log-port)
|
||||
(format log-port "compiling...\t~5,1f% of ~d files" ;FIXME: i18n
|
||||
(* 100. (/ completed total)) total)
|
||||
(force-output log-port)
|
||||
(format debug-port "~%compiling '~a'...~%" file)))))
|
||||
#:report-load
|
||||
(lambda (file total completed)
|
||||
(display #\cr log-port)
|
||||
(format log-port
|
||||
"loading...\t~5,1f% of ~d files" ;FIXME: i18n
|
||||
(* 100. (/ completed total)) total)
|
||||
(force-output log-port)
|
||||
(format debug-port "~%loading '~a'...~%" file))
|
||||
|
||||
#:report-compilation
|
||||
(lambda (file total completed)
|
||||
(display #\cr log-port)
|
||||
(format log-port "compiling...\t~5,1f% of ~d files" ;FIXME: i18n
|
||||
(* 100. (/ completed total)) total)
|
||||
(force-output log-port)
|
||||
(format debug-port "~%compiling '~a'...~%" file))))))
|
||||
|
||||
(newline)
|
||||
#t)
|
||||
|
|
Loading…
Reference in a new issue