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

View file

@ -116,7 +116,9 @@ (define-public r
`(#: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 @@ (define-public r
(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))