2020-10-31 16:29:54 +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.
|
2020-12-15 08:05:57 +00:00
|
|
|
# We also truncate the hash so that it cannot cause reference cycles.
|
|
|
|
export NIX_CFLAGS_COMPILE+=" -frandom-seed=$(
|
|
|
|
outbase="${out##*/}"
|
|
|
|
randomseed="${outbase:0:10}"
|
|
|
|
echo $randomseed
|
|
|
|
)"
|