diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-01-26 18:06:19 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-01-26 18:21:18 +0000 |
commit | 7ac6743433dd45ceaead2ca96f6356dc0d064ce6 (patch) | |
tree | b68ec89d7d2a8d2b6e6b1ff94ba26d6af4096350 /nixpkgs/pkgs/build-support/setup-hooks | |
parent | c5c7451dbef37b51f52792d6395a670ef5183d27 (diff) | |
parent | 891f607d5301d6730cb1f9dcf3618bcb1ab7f10e (diff) | |
download | nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.gz nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.bz2 nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.lz nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.xz nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.zst nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.zip |
Merge commit '891f607d5301d6730cb1f9dcf3618bcb1ab7f10e'
Diffstat (limited to 'nixpkgs/pkgs/build-support/setup-hooks')
-rw-r--r-- | nixpkgs/pkgs/build-support/setup-hooks/reproducible-builds.sh | 7 | ||||
-rw-r--r-- | nixpkgs/pkgs/build-support/setup-hooks/strip.sh | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/build-support/setup-hooks/reproducible-builds.sh b/nixpkgs/pkgs/build-support/setup-hooks/reproducible-builds.sh index 2d8db6ff7d3c..5b01c213fe4a 100644 --- a/nixpkgs/pkgs/build-support/setup-hooks/reproducible-builds.sh +++ b/nixpkgs/pkgs/build-support/setup-hooks/reproducible-builds.sh @@ -1,4 +1,9 @@ # 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. -export NIX_CFLAGS_COMPILE+=" -frandom-seed=${out##*/}" +# We also truncate the hash so that it cannot cause reference cycles. +export NIX_CFLAGS_COMPILE+=" -frandom-seed=$( + outbase="${out##*/}" + randomseed="${outbase:0:10}" + echo $randomseed +)" diff --git a/nixpkgs/pkgs/build-support/setup-hooks/strip.sh b/nixpkgs/pkgs/build-support/setup-hooks/strip.sh index a7cdfd1d2767..c31a50eba57b 100644 --- a/nixpkgs/pkgs/build-support/setup-hooks/strip.sh +++ b/nixpkgs/pkgs/build-support/setup-hooks/strip.sh @@ -51,7 +51,7 @@ stripDirs() { if [ -n "${dirs}" ]; then header "stripping (with command $cmd and flags $stripFlags) in$dirs" - find $dirs -type f -exec $cmd $commonStripFlags $stripFlags '{}' \; # + find $dirs -type f -exec $cmd $commonStripFlags $stripFlags '{}' \; 2>/dev/null stopNest fi } |