2020-12-03 08:41:04 +00:00
|
|
|
# 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.
|
2021-01-15 22:18:51 +00:00
|
|
|
# We also truncate the hash so that it cannot cause reference cycles.
|
2021-09-18 10:52:07 +00:00
|
|
|
NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE:-} -frandom-seed=$(
|
2021-01-15 22:18:51 +00:00
|
|
|
outbase="${out##*/}"
|
|
|
|
randomseed="${outbase:0:10}"
|
|
|
|
echo $randomseed
|
|
|
|
)"
|
2021-09-18 10:52:07 +00:00
|
|
|
export NIX_CFLAGS_COMPILE
|