summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2017-02-07 20:00:10 +0100
committerRicardo Wurmus <rekado@elephly.net>2017-02-07 20:04:49 +0100
commit4621acfd8272fa93d0530faa5f015b26a194b587 (patch)
treed09eb77c5cd72004dfa3ea730e33661f227b9d86 /gnu/packages
parent98d403bb4594c857729d64eaaafaf4a0ca51d7b3 (diff)
downloadguix-4621acfd8272fa93d0530faa5f015b26a194b587.tar.gz
gnu: r: Build default packages reproducibly.
This is a follow-up to commit de643f0c15677665acce73db9c28c5488e623633.

* gnu/packages/statistics.scm (r)[arguments]: Set the built timestamp for core
packages to the epoch; add phase "build-recommended-packages-reproducibly".
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/statistics.scm13
1 files changed, 10 insertions, 3 deletions
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index b4d95bdb71..133ce41c43 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -116,7 +116,9 @@ be output in text, PostScript, PDF or HTML.")
      `(#:make-flags
        (list (string-append "LDFLAGS=-Wl,-rpath="
                             (assoc-ref %outputs "out")
-                            "/lib/R/lib"))
+                            "/lib/R/lib")
+             ;; This affects the embedded timestamp of only the core packages.
+             "PKG_BUILT_STAMP=1970-01-01")
        #:phases
        (modify-phases %standard-phases
          (add-before 'configure 'patch-uname
@@ -126,8 +128,13 @@ be output in text, PostScript, PDF or HTML.")
                (substitute* "src/scripts/R.sh.in"
                  (("uname") uname-bin)))
              #t))
-         (add-before
-          'configure 'set-default-pager
+         (add-after 'unpack 'build-recommended-packages-reproducibly
+           (lambda _
+             (substitute* "src/library/Recommended/Makefile.in"
+               (("INSTALL_OPTS =.*" line)
+                (string-append line " --built-timestamp=1970-01-01")))
+             #t))
+         (add-before 'configure 'set-default-pager
           ;; Set default pager to "cat", because otherwise it is "false",
           ;; making "help()" print nothing at all.
           (lambda _ (setenv "PAGER" "cat") #t))