From 563a66dc314ec75fe2c936f80d83005899b0ed9c Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 4 Nov 2023 00:58:04 -0700 Subject: [PATCH 1/2] python: add python.pythonOnBuildForHost --- pkgs/development/interpreters/python/passthrufun.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/python/passthrufun.nix b/pkgs/development/interpreters/python/passthrufun.nix index 867027e3841c..6cb906be0a51 100644 --- a/pkgs/development/interpreters/python/passthrufun.nix +++ b/pkgs/development/interpreters/python/passthrufun.nix @@ -67,6 +67,8 @@ overrides = packageOverrides; python = self; }); + pythonOnBuildForHost_overridden = + pythonOnBuildForHost.override { inherit packageOverrides; self = pythonOnBuildForHost_overridden; }; in rec { isPy27 = pythonVersion == "2.7"; isPy37 = pythonVersion == "3.7"; @@ -89,9 +91,10 @@ in rec { pythonAtLeast = lib.versionAtLeast pythonVersion; pythonOlder = lib.versionOlder pythonVersion; inherit hasDistutilsCxxPatch; - # TODO: rename to pythonOnBuild + # TODO: deprecate # Not done immediately because its likely used outside Nixpkgs. - pythonForBuild = pythonOnBuildForHost.override { inherit packageOverrides; self = pythonForBuild; }; + pythonForBuild = pythonOnBuildForHost_overridden; + pythonOnBuildForHost = pythonOnBuildForHost_overridden; tests = callPackage ./tests.nix { python = self; From 6adef3f43eefd71c96dd9c4f5c1764d02e99808b Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 4 Nov 2023 21:30:16 -0700 Subject: [PATCH 2/2] pyqtwebengine: use python.pythonOnBuildForHost --- pkgs/development/python-modules/pyqtwebengine/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pyqtwebengine/default.nix b/pkgs/development/python-modules/pyqtwebengine/default.nix index 71abe839a789..9dc076a5e8d1 100644 --- a/pkgs/development/python-modules/pyqtwebengine/default.nix +++ b/pkgs/development/python-modules/pyqtwebengine/default.nix @@ -33,7 +33,7 @@ in buildPythonPackage (rec { ] ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ sip ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ - buildPackages.python3Packages.sip + python.pythonOnBuildForHost.pkgs.sip ] ++ [ qtbase qtsvg