about summary refs log tree commit diff
path: root/pkgs/development/interpreters/python
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-11-21 22:00:14 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2019-11-21 22:00:23 +0100
commit1939a97811b15ace55a172d1f5e32dcb8f562cb0 (patch)
tree6a4ab3d1abc44d64be0a889ce822241610b389c8 /pkgs/development/interpreters/python
parent26328a4cf2a2e461003e936d39bc1e76491c79df (diff)
downloadnixlib-1939a97811b15ace55a172d1f5e32dcb8f562cb0.tar
nixlib-1939a97811b15ace55a172d1f5e32dcb8f562cb0.tar.gz
nixlib-1939a97811b15ace55a172d1f5e32dcb8f562cb0.tar.bz2
nixlib-1939a97811b15ace55a172d1f5e32dcb8f562cb0.tar.lz
nixlib-1939a97811b15ace55a172d1f5e32dcb8f562cb0.tar.xz
nixlib-1939a97811b15ace55a172d1f5e32dcb8f562cb0.tar.zst
nixlib-1939a97811b15ace55a172d1f5e32dcb8f562cb0.zip
python3: add pythonForBuild as parameter, fixes python3Minimal
`pythonForBuild` exists for cross-compilation. When one overrides
python, one needs to ensure pythonForBuild matches.
Diffstat (limited to 'pkgs/development/interpreters/python')
-rw-r--r--pkgs/development/interpreters/python/cpython/default.nix3
-rw-r--r--pkgs/development/interpreters/python/default.nix1
2 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix
index 09c324716bda..43d2d159e36a 100644
--- a/pkgs/development/interpreters/python/cpython/default.nix
+++ b/pkgs/development/interpreters/python/cpython/default.nix
@@ -17,6 +17,7 @@
 # For the Python package set
 , packageOverrides ? (self: super: {})
 , buildPackages
+, pythonForBuild ? buildPackages.${"python${sourceVersion.major}${sourceVersion.minor}"}
 , sourceVersion
 , sha256
 , passthruFun
@@ -63,7 +64,7 @@ let
 
   hasDistutilsCxxPatch = !(stdenv.cc.isGNU or false);
 
-  pythonForBuild = buildPackages.${"python${sourceVersion.major}${sourceVersion.minor}"};
+  inherit pythonForBuild;
 
   pythonForBuildInterpreter = if stdenv.hostPlatform == stdenv.buildPlatform then
     "$out/bin/python"
diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix
index 7fa276dd0708..3be722cd1561 100644
--- a/pkgs/development/interpreters/python/default.nix
+++ b/pkgs/development/interpreters/python/default.nix
@@ -129,6 +129,7 @@ in rec {
   # Minimal versions of Python (built without optional dependencies)
   python3Minimal = (python37.override {
     self = python3Minimal;
+    pythonForBuild = pkgs.buildPackages.python3Minimal;
     # strip down that python version as much as possible
     openssl = null;
     readline = null;