gnu: nethack: Make builds bit-reproducible.
* gnu/packages/games.scm (nethack)[arguments]: In 'patch-paths' phase, define REPRODUCIBLE_BUILD in config.h and set SOURCE_DATE_EPOCH.
This commit is contained in:
parent
3bd0d18661
commit
df35e71542
|
@ -673,9 +673,8 @@ watch your CPU playing while enjoying a cup of tea!")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append
|
(uri (string-append "https://www.nethack.org/download/"
|
||||||
"https://www.nethack.org/download/"
|
version "/" name "-361-src.tgz"))
|
||||||
version "/" name "-361-src.tgz"))
|
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "1dha0ijvxhx7c9hr0452h93x81iiqsll8bc9msdnp7xdqcfbz32b"))))
|
(base32 "1dha0ijvxhx7c9hr0452h93x81iiqsll8bc9msdnp7xdqcfbz32b"))))
|
||||||
(inputs
|
(inputs
|
||||||
|
@ -703,7 +702,15 @@ watch your CPU playing while enjoying a cup of tea!")
|
||||||
"/bin/gzip"))
|
"/bin/gzip"))
|
||||||
(("^WINTTYLIB=.*") "WINTTYLIB=-lncurses"))
|
(("^WINTTYLIB=.*") "WINTTYLIB=-lncurses"))
|
||||||
(substitute* "include/config.h"
|
(substitute* "include/config.h"
|
||||||
(("^.*define CHDIR.*$") ""))
|
(("^.*define CHDIR.*$") "")
|
||||||
|
(("^/\\* *#*define *REPRODUCIBLE_BUILD *\\*/")
|
||||||
|
;; Honor SOURCE_DATE_EPOCH.
|
||||||
|
"#define REPRODUCIBLE_BUILD"))
|
||||||
|
|
||||||
|
;; Note: 'makedefs' rejects and ignores dates that are too old
|
||||||
|
;; or too new, so we must choose something reasonable here.
|
||||||
|
(setenv "SOURCE_DATE_EPOCH" "1531865062")
|
||||||
|
|
||||||
(substitute* "sys/unix/Makefile.src"
|
(substitute* "sys/unix/Makefile.src"
|
||||||
(("^# CC = gcc") "CC = gcc"))
|
(("^# CC = gcc") "CC = gcc"))
|
||||||
#t))
|
#t))
|
||||||
|
|
Loading…
Reference in New Issue