diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-01-26 16:21:43 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-01-26 16:24:32 +0100 |
commit | f4553d721972e6a437c9f367af2bb0967b773998 (patch) | |
tree | 5109191c20d3dda8b7efeddcea4b78f09937c749 | |
parent | de26cac3cb1ec12f5a8ccb2b7ff9b58555aae3bc (diff) | |
download | nixpkgs-f4553d721972e6a437c9f367af2bb0967b773998.tar nixpkgs-f4553d721972e6a437c9f367af2bb0967b773998.tar.gz nixpkgs-f4553d721972e6a437c9f367af2bb0967b773998.tar.bz2 nixpkgs-f4553d721972e6a437c9f367af2bb0967b773998.tar.lz nixpkgs-f4553d721972e6a437c9f367af2bb0967b773998.tar.xz nixpkgs-f4553d721972e6a437c9f367af2bb0967b773998.tar.zst nixpkgs-f4553d721972e6a437c9f367af2bb0967b773998.zip |
defaultUnpack: Preserve timestamps when copying files
Commit 6d928ab684327e0eeb1bf6cd889d57ca7127e8a7 changed this to not preserve timestamps. However, that results in non-determinism; in particular, it gives us a broken $SOURCE_DATE_EPOCH (especially for everything using fetchFromGitHub). Builds affected by timestamps < 1980 should be fixed in some other way (e.g. changing the timestamp to some fixed date > 1980).
-rw-r--r-- | pkgs/stdenv/generic/setup.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index d8de9ab2390..102a8f2f71c 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -480,9 +480,11 @@ _defaultUnpack() { if [ -d "$fn" ]; then stripHash "$fn" - # We can't preserve hardlinks because they may have been introduced by - # store optimization, which might break things in the build - cp -pr --reflink=auto --no-preserve=timestamps "$fn" $strippedName + + # We can't preserve hardlinks because they may have been + # introduced by store optimization, which might break things + # in the build. + cp -pr --reflink=auto "$fn" $strippedName else |