gnu: r: Build default packages reproducibly.

This is a follow-up to commit de643f0c15.

* gnu/packages/statistics.scm (r)[arguments]: Set the built timestamp for core
packages to the epoch; add phase "build-recommended-packages-reproducibly".
This commit is contained in:
Ricardo Wurmus 2017-02-07 20:00:10 +01:00
parent 98d403bb45
commit 4621acfd82
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
1 changed files with 10 additions and 3 deletions

View File

@ -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))