summary refs log tree commit diff
path: root/pkgs/stdenv
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2020-06-08 11:52:58 +0100
committerJörg Thalheim <joerg@thalheim.io>2020-06-08 11:54:46 +0100
commitbc4927a5263aef5f418e81dc97c23bbf57f23d81 (patch)
tree69378ef39393e25e4354104a324751f3fb923402 /pkgs/stdenv
parent8576d24b2ac27a216b6e32b167c258ae4f8bfe69 (diff)
downloadnixpkgs-bc4927a5263aef5f418e81dc97c23bbf57f23d81.tar
nixpkgs-bc4927a5263aef5f418e81dc97c23bbf57f23d81.tar.gz
nixpkgs-bc4927a5263aef5f418e81dc97c23bbf57f23d81.tar.bz2
nixpkgs-bc4927a5263aef5f418e81dc97c23bbf57f23d81.tar.lz
nixpkgs-bc4927a5263aef5f418e81dc97c23bbf57f23d81.tar.xz
nixpkgs-bc4927a5263aef5f418e81dc97c23bbf57f23d81.tar.zst
nixpkgs-bc4927a5263aef5f418e81dc97c23bbf57f23d81.zip
stdenv: set SOURCE_DATE_EPOCH to a value python supports
in nix-shell this value breaks the build because python's
packaging refuses to build timestamps that date before 1980.
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r--pkgs/stdenv/generic/setup.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh
index 839757945a2..d19ed342aab 100644
--- a/pkgs/stdenv/generic/setup.sh
+++ b/pkgs/stdenv/generic/setup.sh
@@ -219,12 +219,13 @@ printWords() {
 # Initialisation.
 
 
-# Set a fallback default value for SOURCE_DATE_EPOCH, used by some
-# build tools to provide a deterministic substitute for the "current"
-# time. Note that 1 = 1970-01-01 00:00:01. We don't use 0 because it
-# confuses some applications.
+# Set a fallback default value for SOURCE_DATE_EPOCH, used by some build tools
+# to provide a deterministic substitute for the "current" time. Note that
+# 315532800 = 1980-01-01 12:00:00. We use this date because python's wheel
+# implementation uses zip archive and zip does not support dates going back to
+# 1970.
 export SOURCE_DATE_EPOCH
-: ${SOURCE_DATE_EPOCH:=1}
+: ${SOURCE_DATE_EPOCH:=315532800}
 
 
 # Wildcard expansions that don't match should expand to an empty list.