summaryrefslogtreecommitdiff
path: root/guix/build/asdf-build-system.scm
diff options
context:
space:
mode:
authorGuillaume Le Vaillant <glv@posteo.net>2020-01-12 14:29:41 +0100
committerGuillaume Le Vaillant <glv@posteo.net>2020-01-12 14:48:30 +0100
commit6b8f7c397aa9c8b3f078153b1b6a90db3bb0b79e (patch)
tree3f0af2b3ee26fff802d53053444aec2054664649 /guix/build/asdf-build-system.scm
parentd75a0cd98649c610c8c6ed05011233a49af156e9 (diff)
build: asdf-build-system: Improve reproducibility.
* guix/build/asdf-build-system.scm (copy-files-to-output): Reset timestamps of source files before compiling.
Diffstat (limited to 'guix/build/asdf-build-system.scm')
-rw-r--r--guix/build/asdf-build-system.scm9
1 files changed, 9 insertions, 0 deletions
diff --git a/guix/build/asdf-build-system.scm b/guix/build/asdf-build-system.scm
index 1be2b3c5f0..f3f4b49bcf 100644
--- a/guix/build/asdf-build-system.scm
+++ b/guix/build/asdf-build-system.scm
@@ -79,6 +79,15 @@ valid."
(let ((source (getcwd))
(target (source-directory out name))
(system-path (string-append out %system-install-prefix)))
+ ;; SBCL keeps the modification time of the source file in the compiled
+ ;; file, and the source files might just have been patched by a custom
+ ;; phase. Therefore we reset the modification time of all the source
+ ;; files before compiling.
+ (for-each (lambda (file)
+ (let ((s (lstat file)))
+ (unless (eq? (stat:type s) 'symlink)
+ (utime file 0 0 0 0))))
+ (find-files source #:directories? #t))
(copy-recursively source target #:keep-mtime? #t)
(mkdir-p system-path)
(for-each