summary refs log tree commit diff
path: root/pkgs/build-support/setup-hooks/reproducible-builds.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/setup-hooks/reproducible-builds.sh')
-rw-r--r--pkgs/build-support/setup-hooks/reproducible-builds.sh8
1 files changed, 2 insertions, 6 deletions
diff --git a/pkgs/build-support/setup-hooks/reproducible-builds.sh b/pkgs/build-support/setup-hooks/reproducible-builds.sh
index 29efd22d905..5b01c213fe4 100644
--- a/pkgs/build-support/setup-hooks/reproducible-builds.sh
+++ b/pkgs/build-support/setup-hooks/reproducible-builds.sh
@@ -1,13 +1,9 @@
-# shellcheck disable=SC2148
 # 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.
 # We also truncate the hash so that it cannot cause reference cycles.
-# NIX_CFLAGS_COMPILE might not have been defined before
-NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE:-} -frandom-seed=$(
-    # shellcheck disable=SC2154
+export NIX_CFLAGS_COMPILE+=" -frandom-seed=$(
     outbase="${out##*/}"
     randomseed="${outbase:0:10}"
-    echo "$randomseed"
+    echo $randomseed
 )"
-export NIX_CFLAGS_COMPILE