python: Propagate packageOverrides to pythonForBuild

When overriding versions of build tools injected via hooks
`packageOverrides` was not taken into account and 2 incompatible
versions of the same package (`wheel` in this case) ended up in the
closure, causing the builds to fail.
This commit is contained in:
adisbladis 2020-11-30 11:12:59 +01:00
parent ee3c23e0a3
commit 49b8738a5f
No known key found for this signature in database
GPG Key ID: 110BFAD44C6249B7

View File

@ -102,7 +102,7 @@ with pkgs;
inherit hasDistutilsCxxPatch;
# TODO: rename to pythonOnBuild
# Not done immediately because its likely used outside Nixpkgs.
pythonForBuild = pythonOnBuildForHost;
pythonForBuild = pythonOnBuildForHost.override { inherit packageOverrides; self = pythonForBuild; };
tests = callPackage ./tests.nix {
python = self;