@@ -14,12 +14,12 @@ with pkgs;
1414 , packageOverrides
1515 , sitePackages
1616 , hasDistutilsCxxPatch
17− , pythonPackagesBuildBuild
18− , pythonForBuild # provides pythonPackagesBuildHost
19− , pythonPackagesBuildTarget
20− , pythonPackagesHostHost
21− , self # is pythonPackagesHostTarget
22− , pythonPackagesTargetTarget
17+ , pythonOnBuildForBuild
18+ , pythonOnBuildForHost
19+ , pythonOnBuildForTarget
20+ , pythonOnHostForHost
21+ , pythonOnTargetForTarget
22+ , self # is pythonOnHostForTarget
2323 }: let
2424 pythonPackages = callPackage
2525 ({ pkgs, stdenv, python, overrides }: let
@@ -28,11 +28,11 @@ with pkgs;
2828 python = self;
2929 };
3030 otherSplices = {
31− selfBuildBuild = pythonPackagesBuildBuild;
32− selfBuildHost = pythonForBuild.pkgs;
33− selfBuildTarget = pythonPackagesBuildTarget;
34− selfHostHost = pythonPackagesHostHost;
35− selfTargetTarget = pythonPackagesTargetTarget;
31+ selfBuildBuild = pythonOnBuildForBuild.pkgs;
32+ selfBuildHost = pythonOnBuildForHost.pkgs;
33+ selfBuildTarget = pythonOnBuildForTarget.pkgs;
34+ selfHostHost = pythonOnHostForHost.pkgs;
35+ selfTargetTarget = pythonOnTargetForTarget.pkgs or {}; # There is no Python TargetTarget.
3636 };
3737 keep = self: {
3838 # TODO maybe only define these here so nothing is needed to be kept in sync.
@@ -99,7 +99,10 @@ with pkgs;
9999 inherit sourceVersion;
100100 pythonAtLeast = lib.versionAtLeast pythonVersion;
101101 pythonOlder = lib.versionOlder pythonVersion;
102− inherit hasDistutilsCxxPatch pythonForBuild;
102+ inherit hasDistutilsCxxPatch;
103+ # TODO: rename to pythonOnBuild
104+ # Not done immediately because its likely used outside Nixpkgs.
105+ pythonForBuild = pythonOnBuildForHost;
103106
104107 tests = callPackage ./tests.nix {
105108 python = self;
@@ -188,7 +191,6 @@ in {
188191 # Minimal versions of Python (built without optional dependencies)
189192 python3Minimal = (python38.override {
190193 self = python3Minimal;
191− pythonForBuild = pkgs.buildPackages.python3Minimal;
192194 # strip down that python version as much as possible
193195 openssl = null;
194196 readline = null;