1# Use the last part of the out path as hash input for the build.
2# This should ensure that it is deterministic across rebuilds of the same
3# derivation and not easily collide with other builds.
4# We also truncate the hash so that it cannot cause reference cycles.
5NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE:-} -frandom-seed=$(
6 randSeed=${NIX_OUTPATH_USED_AS_RANDOM_SEED:-$out}
7 outbase="${randSeed##*/}"
8 randomseed="${outbase:0:10}"
9 echo $randomseed
10)"
11export NIX_CFLAGS_COMPILE