Python: rename parameters and arguments passed to passthru

As part of the splicing the build/host/target combinations of the interpreter
need to be passed around internally. The chosen names were not very clear,
implying they were package sets whereas actually there were derivations.
This commit is contained in:
Frederik Rietdijk 2020-11-28 16:56:51 +01:00
parent 8220b0449c
commit 6cf25f9dbd
4 changed files with 27 additions and 27 deletions

View File

@ -50,11 +50,11 @@ let
pythonVersion = with sourceVersion; "${major}.${minor}"; pythonVersion = with sourceVersion; "${major}.${minor}";
sitePackages = "lib/${libPrefix}/site-packages"; sitePackages = "lib/${libPrefix}/site-packages";
inherit hasDistutilsCxxPatch; inherit hasDistutilsCxxPatch;
pythonPackagesBuildBuild = pkgsBuildBuild.${pythonAttr}; pythonOnBuildForBuild = pkgsBuildBuild.${pythonAttr};
pythonPackagesBuildHost = pkgsBuildHost.${pythonAttr}; pythonOnBuildForHost = pkgsBuildHost.${pythonAttr};
pythonPackagesBuildTarget = pkgsBuildTarget.${pythonAttr}; pythonOnBuildForTarget = pkgsBuildTarget.${pythonAttr};
pythonPackagesHostHost = pkgsHostHost.${pythonAttr}; pythonOnHostForHost = pkgsHostHost.${pythonAttr};
pythonPackagesTargetTarget = pkgsTargetTarget.${pythonAttr} or {}; pythonOnTargetForTarget = pkgsTargetTarget.${pythonAttr} or {};
} // { } // {
inherit ucsEncoding; inherit ucsEncoding;
}; };

View File

@ -68,11 +68,11 @@ let
pythonVersion = with sourceVersion; "${major}.${minor}"; pythonVersion = with sourceVersion; "${major}.${minor}";
sitePackages = "lib/${libPrefix}/site-packages"; sitePackages = "lib/${libPrefix}/site-packages";
inherit hasDistutilsCxxPatch; inherit hasDistutilsCxxPatch;
pythonPackagesBuildBuild = pkgsBuildBuild.${pythonAttr}; pythonOnBuildForBuild = pkgsBuildBuild.${pythonAttr};
pythonPackagesBuildHost = pkgsBuildHost.${pythonAttr}; pythonOnBuildForHost = pkgsBuildHost.${pythonAttr};
pythonPackagesBuildTarget = pkgsBuildTarget.${pythonAttr}; pythonOnBuildForTarget = pkgsBuildTarget.${pythonAttr};
pythonPackagesHostHost = pkgsHostHost.${pythonAttr}; pythonOnHostForHost = pkgsHostHost.${pythonAttr};
pythonPackagesTargetTarget = pkgsTargetTarget.${pythonAttr} or {}; pythonOnTargetForTarget = pkgsTargetTarget.${pythonAttr} or {};
}; };
version = with sourceVersion; "${major}.${minor}.${patch}${suffix}"; version = with sourceVersion; "${major}.${minor}.${patch}${suffix}";

View File

@ -14,12 +14,12 @@ with pkgs;
, packageOverrides , packageOverrides
, sitePackages , sitePackages
, hasDistutilsCxxPatch , hasDistutilsCxxPatch
, pythonPackagesBuildBuild , pythonOnBuildForBuild
, pythonPackagesBuildHost , pythonOnBuildForHost
, pythonPackagesBuildTarget , pythonOnBuildForTarget
, pythonPackagesHostHost , pythonOnHostForHost
, self # is pythonPackagesHostTarget , pythonOnTargetForTarget
, pythonPackagesTargetTarget , self # is pythonOnHostForTarget
}: let }: let
pythonPackages = callPackage pythonPackages = callPackage
({ pkgs, stdenv, python, overrides }: let ({ pkgs, stdenv, python, overrides }: let
@ -28,11 +28,11 @@ with pkgs;
python = self; python = self;
}; };
otherSplices = { otherSplices = {
selfBuildBuild = pythonPackagesBuildBuild; selfBuildBuild = pythonOnBuildForBuild;
selfBuildHost = pythonPackagesBuildHost; selfBuildHost = pythonOnBuildForHost;
selfBuildTarget = pythonPackagesBuildTarget; selfBuildTarget = pythonOnBuildForTarget;
selfHostHost = pythonPackagesHostHost; selfHostHost = pythonOnHostForHost;
selfTargetTarget = pythonPackagesTargetTarget; selfTargetTarget = pythonOnTargetForTarget;
}; };
keep = self: { keep = self: {
# TODO maybe only define these here so nothing is needed to be kept in sync. # TODO maybe only define these here so nothing is needed to be kept in sync.
@ -100,7 +100,7 @@ with pkgs;
pythonAtLeast = lib.versionAtLeast pythonVersion; pythonAtLeast = lib.versionAtLeast pythonVersion;
pythonOlder = lib.versionOlder pythonVersion; pythonOlder = lib.versionOlder pythonVersion;
inherit hasDistutilsCxxPatch; inherit hasDistutilsCxxPatch;
pythonForBuild = pythonPackagesBuildHost; pythonForBuild = pythonOnBuildForHost;
tests = callPackage ./tests.nix { tests = callPackage ./tests.nix {
python = self; python = self;

View File

@ -31,11 +31,11 @@ let
sitePackages = "site-packages"; sitePackages = "site-packages";
hasDistutilsCxxPatch = false; hasDistutilsCxxPatch = false;
pythonPackagesBuildBuild = pkgsBuildBuild.${pythonAttr}; pythonOnBuildForBuild = pkgsBuildBuild.${pythonAttr};
pythonPackagesBuildHost = pkgsBuildHost.${pythonAttr}; pythonOnBuildForHost = pkgsBuildHost.${pythonAttr};
pythonPackagesBuildTarget = pkgsBuildTarget.${pythonAttr}; pythonOnBuildForTarget = pkgsBuildTarget.${pythonAttr};
pythonPackagesHostHost = pkgsHostHost.${pythonAttr}; pythonOnHostForHost = pkgsHostHost.${pythonAttr};
pythonPackagesTargetTarget = pkgsTargetTarget.${pythonAttr} or {}; pythonOnTargetForTarget = pkgsTargetTarget.${pythonAttr} or {};
}; };
pname = passthru.executable; pname = passthru.executable;
version = with sourceVersion; "${major}.${minor}.${patch}"; version = with sourceVersion; "${major}.${minor}.${patch}";