aboutsummaryrefslogtreecommitdiff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorAndreas Rammhold <andreas@rammhold.de>2020-11-19 01:07:28 +0100
committerGitHub <noreply@github.com>2020-11-19 01:07:28 +0100
commit278b273d9a41fd87df4317d7c00093810cd953ff (patch)
treec319c553286b80d3b923dd2e76a09939f9c941eb /pkgs/build-support
parent944a6ae388bd97aa1d5f27c9603a4effaa2567b9 (diff)
parent83f0bccc89b6cd6de576609bb49abcb3f507d58e (diff)
Merge pull request #102251 from andir/random-seed
stdenv: introduce -frandom-seed
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/setup-hooks/reproducible-builds.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/build-support/setup-hooks/reproducible-builds.sh b/pkgs/build-support/setup-hooks/reproducible-builds.sh
new file mode 100644
index 000000000000..2d8db6ff7d3c
--- /dev/null
+++ b/pkgs/build-support/setup-hooks/reproducible-builds.sh
@@ -0,0 +1,4 @@
+# Use the last part of the out path as hash input for the build.
+# This should ensure that it is deterministic across rebuilds of the same
+# derivation and not easily collide with other builds.
+export NIX_CFLAGS_COMPILE+=" -frandom-seed=${out##*/}"