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:
@@ -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) ''
|
||||
|
||||
Reference in New Issue
Block a user