From f488b617ab41daaaa6bcae761a4fa92536d69a0e Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 18 Feb 2023 14:53:42 +0000 Subject: [PATCH] setup-hooks/reproducible-builds.sh: NIX_OUTPATH_USED_AS_RANDOM_SEED (take 2) (#216967) This time the change targets `staging`. This reverts commit e1f1c7eb79fefa5e640bfbc9e023619ef095935a. --- pkgs/build-support/setup-hooks/reproducible-builds.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/setup-hooks/reproducible-builds.sh b/pkgs/build-support/setup-hooks/reproducible-builds.sh index 7b52f84df67b..5e27ce8a25fe 100644 --- a/pkgs/build-support/setup-hooks/reproducible-builds.sh +++ b/pkgs/build-support/setup-hooks/reproducible-builds.sh @@ -3,7 +3,8 @@ # derivation and not easily collide with other builds. # We also truncate the hash so that it cannot cause reference cycles. NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE:-} -frandom-seed=$( - outbase="${out##*/}" + randSeed=${NIX_OUTPATH_USED_AS_RANDOM_SEED:-$out} + outbase="${randSeed##*/}" randomseed="${outbase:0:10}" echo $randomseed )"