about summary refs log tree commit diff
path: root/pkgs/development/interpreters/python/mk-python-derivation.nix
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2017-02-09 16:30:15 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2017-02-26 14:50:09 +0100
commitdd3a501a4ba29c2e929928981dcac3768b44c77b (patch)
tree01fcea18c3b478ce6d6bec06633508ab3fdf975b /pkgs/development/interpreters/python/mk-python-derivation.nix
parent8970a9c86e0fe0935ed5c53897874f38ba497fac (diff)
downloadnixlib-dd3a501a4ba29c2e929928981dcac3768b44c77b.tar
nixlib-dd3a501a4ba29c2e929928981dcac3768b44c77b.tar.gz
nixlib-dd3a501a4ba29c2e929928981dcac3768b44c77b.tar.bz2
nixlib-dd3a501a4ba29c2e929928981dcac3768b44c77b.tar.lz
nixlib-dd3a501a4ba29c2e929928981dcac3768b44c77b.tar.xz
nixlib-dd3a501a4ba29c2e929928981dcac3768b44c77b.tar.zst
nixlib-dd3a501a4ba29c2e929928981dcac3768b44c77b.zip
Python: mkPythonDerivation: use PYTHONHASHSEED=0
Diffstat (limited to 'pkgs/development/interpreters/python/mk-python-derivation.nix')
-rw-r--r--pkgs/development/interpreters/python/mk-python-derivation.nix7
1 files changed, 5 insertions, 2 deletions
diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix
index c8fedaf75fc9..69eea056c763 100644
--- a/pkgs/development/interpreters/python/mk-python-derivation.nix
+++ b/pkgs/development/interpreters/python/mk-python-derivation.nix
@@ -57,9 +57,12 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled"] // {
 
   inherit pythonPath;
 
-  # patch python interpreter to write null timestamps when compiling python files
-  # this way python doesn't try to update them when we freeze timestamps in nix store
+
+  # Determinism: The interpreter is patched to write null timestamps when compiling python files.
+  # This way python doesn't try to update them when we freeze timestamps in nix store.
   DETERMINISTIC_BUILD=1;
+  # Determinism: We fix the hashes of str, bytes and datetime objects.
+  PYTHONHASHSEED = 0;
 
   buildInputs = [ wrapPython ] ++ buildInputs ++ pythonPath
     ++ [ (ensureNewerSourcesHook { year = "1980"; }) ]