From acd32a4caf533ca6202afad07c085450649dbe4a Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Fri, 19 May 2017 14:21:58 +0200 Subject: 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. --- pkgs/top-level/all-packages.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkgs/top-level/all-packages.nix') 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 { -- cgit 1.4.1