Merge pull request #102251 from andir/random-seed

stdenv: introduce -frandom-seed
This commit is contained in:
Andreas Rammhold 2020-11-19 01:07:28 +01:00 committed by GitHub
commit 278b273d9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -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##*/}"

View File

@ -70,6 +70,7 @@ let
../../build-support/setup-hooks/move-sbin.sh
../../build-support/setup-hooks/move-lib64.sh
../../build-support/setup-hooks/set-source-date-epoch-to-latest.sh
../../build-support/setup-hooks/reproducible-builds.sh
# TODO use lib.optional instead
(if hasCC then cc else null)
];