diff options
Diffstat (limited to 'pkgs/development/interpreters/python/cpython')
-rw-r--r-- | pkgs/development/interpreters/python/cpython/2.7/default.nix | 11 | ||||
-rw-r--r-- | pkgs/development/interpreters/python/cpython/default.nix | 12 |
2 files changed, 21 insertions, 2 deletions
diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index 2cfaa69a4c8..26bd8a8f360 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -19,6 +19,10 @@ # For the Python package set , packageOverrides ? (self: super: {}) , buildPackages +, pkgsBuildBuild +, pkgsBuildTarget +, pkgsHostHost +, pkgsTargetTarget , sourceVersion , sha256 , passthruFun @@ -35,7 +39,8 @@ with stdenv.lib; let - pythonForBuild = buildPackages.${"python${sourceVersion.major}${sourceVersion.minor}"}; + pythonAttr = "python${sourceVersion.major}${sourceVersion.minor}"; + pythonForBuild = buildPackages.${pythonAttr}; passthru = passthruFun rec { inherit self sourceVersion packageOverrides; @@ -45,6 +50,10 @@ let pythonVersion = with sourceVersion; "${major}.${minor}"; sitePackages = "lib/${libPrefix}/site-packages"; inherit hasDistutilsCxxPatch pythonForBuild; + pythonPackagesBuildBuild = pkgsBuildBuild.${pythonAttr}; + pythonPackagesBuildTarget = pkgsBuildTarget.${pythonAttr}; + pythonPackagesHostHost = pkgsHostHost.${pythonAttr}; + pythonPackagesTargetTarget = pkgsTargetTarget.${pythonAttr} or {}; } // { inherit ucsEncoding; }; diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 77512c02d55..02777063a77 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -20,7 +20,11 @@ # For the Python package set , packageOverrides ? (self: super: {}) , buildPackages -, pythonForBuild ? buildPackages.${"python${sourceVersion.major}${sourceVersion.minor}"} +, pkgsBuildBuild +, pkgsBuildTarget +, pkgsHostHost +, pkgsTargetTarget +, pythonForBuild ? buildPackages.${pythonAttr} , sourceVersion , sha256 , passthruFun @@ -36,6 +40,7 @@ # Not using optimizations on Darwin # configure: error: llvm-profdata is required for a --enable-optimizations build but could not be found. , enableOptimizations ? (!stdenv.isDarwin) +, pythonAttr ? "python${sourceVersion.major}${sourceVersion.minor}" }: # Note: this package is used for bootstrapping fetchurl, and thus @@ -54,6 +59,7 @@ with stdenv.lib; let + passthru = passthruFun rec { inherit self sourceVersion packageOverrides; implementation = "cpython"; @@ -62,6 +68,10 @@ let pythonVersion = with sourceVersion; "${major}.${minor}"; sitePackages = "lib/${libPrefix}/site-packages"; inherit hasDistutilsCxxPatch pythonForBuild; + pythonPackagesBuildBuild = pkgsBuildBuild.${pythonAttr}; + pythonPackagesBuildTarget = pkgsBuildTarget.${pythonAttr}; + pythonPackagesHostHost = pkgsHostHost.${pythonAttr}; + pythonPackagesTargetTarget = pkgsTargetTarget.${pythonAttr} or {}; }; version = with sourceVersion; "${major}.${minor}.${patch}${suffix}"; |