diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-07-18 00:12:13 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-07-18 00:22:33 +0200 |
commit | df35e7154236e0aff1ff2720a5b12d7c4df72ad1 (patch) | |
tree | 91b84b14239329c9c5051fe6ec7b529885aa7f5a /gnu/packages/games.scm | |
parent | 3bd0d1866159fa208e640d2ae2c0dffecfc76dd1 (diff) | |
download | gnu-guix-df35e7154236e0aff1ff2720a5b12d7c4df72ad1.tar gnu-guix-df35e7154236e0aff1ff2720a5b12d7c4df72ad1.tar.gz |
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.
Diffstat (limited to 'gnu/packages/games.scm')
-rw-r--r-- | gnu/packages/games.scm | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index dc07f8da3c..ca86703a83 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -673,9 +673,8 @@ watch your CPU playing while enjoying a cup of tea!") (source (origin (method url-fetch) - (uri (string-append - "https://www.nethack.org/download/" - version "/" name "-361-src.tgz")) + (uri (string-append "https://www.nethack.org/download/" + version "/" name "-361-src.tgz")) (sha256 (base32 "1dha0ijvxhx7c9hr0452h93x81iiqsll8bc9msdnp7xdqcfbz32b")))) (inputs @@ -703,7 +702,15 @@ watch your CPU playing while enjoying a cup of tea!") "/bin/gzip")) (("^WINTTYLIB=.*") "WINTTYLIB=-lncurses")) (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" (("^# CC = gcc") "CC = gcc")) #t)) |