diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2017-05-19 14:21:58 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2017-05-19 16:28:11 +0200 |
commit | acd32a4caf533ca6202afad07c085450649dbe4a (patch) | |
tree | 65a6371aaa7f5db5caf583d55a657620aa66ce9f /pkgs/top-level | |
parent | 5aa530f2a8f6ee640b166786a32fbf6788993516 (diff) | |
download | nixlib-acd32a4caf533ca6202afad07c085450649dbe4a.tar nixlib-acd32a4caf533ca6202afad07c085450649dbe4a.tar.gz nixlib-acd32a4caf533ca6202afad07c085450649dbe4a.tar.bz2 nixlib-acd32a4caf533ca6202afad07c085450649dbe4a.tar.lz nixlib-acd32a4caf533ca6202afad07c085450649dbe4a.tar.xz nixlib-acd32a4caf533ca6202afad07c085450649dbe4a.tar.zst nixlib-acd32a4caf533ca6202afad07c085450649dbe4a.zip |
Python: set DETERMINISTIC_BUILD and PYTHONHASHSEED in setupHook
The Python interpreters are patched so they can build .pyc bytecode free of certain indeterminism. When building Python packages we currently set ``` compiling python files. in nix store. DETERMINISTIC_BUILD=1; PYTHONHASHSEED = 0; ``` Instead if setting these environment variables in the function that builds the package, this commit sets the variables instead in the Python setup hook. That way, whenever Python is included in a derivation, these variables are set. See also the issue https://github.com/NixOS/nixpkgs/issues/25707.
Diffstat (limited to 'pkgs/top-level')
-rw-r--r-- | pkgs/top-level/all-packages.nix | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ea47d41fc348..ae7e30d0ff89 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6162,6 +6162,9 @@ with pkgs; self = python36; }; + # Should eventually be moved inside Python interpreters. + python-setup-hook = callPackage ../development/interpreters/python/setup-hook.nix { }; + pypy = pypy27; pypy27 = callPackage ../development/interpreters/python/pypy/2.7 { |