Python: add DETERMINISTIC_BUILD env var. If set, python doesn't write timestamps to pyc files. Tested by

building argparse, compiling from cli, compiling using py_compile.
This commit is contained in:
Evgeny Egorochkin
2013-06-22 08:52:27 +03:00
parent a3bf1ca3b1
commit 09e6ae577b
3 changed files with 41 additions and 0 deletions

View File

@@ -25,6 +25,10 @@ let
# doesn't work in Nix because Nix changes the mtime of files in
# the Nix store to 1. So treat that as a special case.
./nix-store-mtime.patch
# patch python to put zero timestamp into pyc
# if DETERMINISTIC_BUILD env var is set
./deterministic-build.patch
];
postPatch = stdenv.lib.optionalString (stdenv.gcc.libc != null) ''