2020-10-31 17:29:54 +01: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 09:05:57 +01:00
|
|
|
# We also truncate the hash so that it cannot cause reference cycles.
|
2021-07-19 08:56:02 +02:00
|
|
|
NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE:-} -frandom-seed=$(
|
2023-02-18 15:53:42 +01:00
|
|
|
randSeed=${NIX_OUTPATH_USED_AS_RANDOM_SEED:-$out}
|
|
|
|
outbase="${randSeed##*/}"
|
2020-12-15 09:05:57 +01:00
|
|
|
randomseed="${outbase:0:10}"
|
2021-07-17 20:27:52 +02:00
|
|
|
echo $randomseed
|
2020-12-15 09:05:57 +01:00
|
|
|
)"
|
2021-07-19 08:56:02 +02:00
|
|
|
export NIX_CFLAGS_COMPILE
|