diff --git a/hooks/default.nix b/hooks/default.nix index 5325aeb98..03b974e18 100644 --- a/hooks/default.nix +++ b/hooks/default.nix @@ -1,11 +1,11 @@ { python, stdenv, makeSetupHook, pkgs, lib }: let - inherit (python) pythonForBuild; - inherit (pythonForBuild.pkgs) callPackage; - pythonInterpreter = pythonForBuild.interpreter; + pythonOnBuildForHost = python.pythonOnBuildForHost or python.pythonForBuild; + inherit (pythonOnBuildForHost.pkgs) callPackage; + pythonInterpreter = pythonOnBuildForHost.interpreter; pythonSitePackages = python.sitePackages; - nonOverlayedPython = pkgs.python3.pythonForBuild.withPackages (ps: [ ps.tomlkit ]); + nonOverlayedPython = (pkgs.python3.pythonOnBuildForHost or pkgs.python3.pythonForBuild).withPackages (ps: [ ps.tomlkit ]); makeRemoveSpecialDependenciesHook = { fields , kind diff --git a/overrides/default.nix b/overrides/default.nix index 583d4a013..b877c26e7 100644 --- a/overrides/default.nix +++ b/overrides/default.nix @@ -25,13 +25,13 @@ let true; intendedBuildSystem = if attr.buildSystem == "cython" then - self.python.pythonForBuild.pkgs.cython + (self.python.pythonOnBuildForHost or self.python.pythonForBuild).pkgs.cython else self.${attr.buildSystem}; in if fromIsValid && untilIsValid then intendedBuildSystem else null else - if attr == "cython" then self.python.pythonForBuild.pkgs.cython else self.${attr}; + if attr == "cython" then (self.python.pythonOnBuildForHost or self.python.pythonForBuild).pkgs.cython else self.${attr}; in if (attr == "flit-core" || attr == "flit" || attr == "hatchling") && !self.isPy3k then drv else if drv == null then null @@ -101,7 +101,7 @@ lib.composeManyExtensions [ let inherit (self.python) stdenv; inherit (pkgs.buildPackages) pkg-config; - pyBuildPackages = self.python.pythonForBuild.pkgs; + pyBuildPackages = (self.python.pythonOnBuildForHost or self.python.pythonForBuild).pkgs; selectQt5 = version: let @@ -129,7 +129,7 @@ lib.composeManyExtensions [ qtxmlpatterns ]; - bootstrappingBase = pkgs.${self.python.pythonAttr}.pythonForBuild.pkgs; + bootstrappingBase = (pkgs.${self.python.pythonAttr}.pythonOnBuildForHost or pkgs.${self.python.pythonAttr}.pythonForBuild).pkgs; in {