stdenv: conservative undefined variables

This commit is contained in:
happysalada 2021-07-19 15:56:02 +09:00 committed by Raphael Megzari
parent e47b93b402
commit 0900850680
2 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
preConfigurePhases+=" autoreconfPhase"
preConfigurePhases="${preConfigurePhases:-} autoreconfPhase"
autoreconfPhase() {
runHook preAutoreconf

View File

@ -2,8 +2,9 @@
# This should ensure that it is deterministic across rebuilds of the same
# derivation and not easily collide with other builds.
# We also truncate the hash so that it cannot cause reference cycles.
export NIX_CFLAGS_COMPILE+=" -frandom-seed=$(
NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE:-} -frandom-seed=$(
outbase="${out##*/}"
randomseed="${outbase:0:10}"
echo $randomseed
)"
export NIX_CFLAGS_COMPILE