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;