Skip to content

Commit

Permalink
chore: build bootstrapping packages using pythonForBuild to support…
Browse files Browse the repository at this point in the history
… aarch64
  • Loading branch information
cpcloud committed Oct 24, 2023
1 parent 87ed113 commit 880f0bd
Showing 1 changed file with 32 additions and 26 deletions.
58 changes: 32 additions & 26 deletions overrides/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,41 @@ lib.composeManyExtensions [
qtx11extras
qtxmlpatterns
];

bootstrappingBase = pkgs.python3.pythonForBuild.pkgs;
in

{
#### BEGIN bootstrapping pkgs
installer = bootstrappingBase.installer.override {
inherit (self) buildPythonPackage flit-core;
};

build = bootstrappingBase.build.override {
inherit (self) buildPythonPackage flit-core packaging pyproject-hooks tomli;
};

flit-core = bootstrappingBase.flit-core.override {
inherit (self) buildPythonPackage flit;
};

packaging = bootstrappingBase.packaging.override {
inherit (self) buildPythonPackage flit-core;
};

tomli = bootstrappingBase.tomli.override {
inherit (self) buildPythonPackage flit-core;
};

pyproject-hooks = bootstrappingBase.pyproject-hooks.override {
inherit (self) buildPythonPackage flit-core tomli;
};

wheel = bootstrappingBase.wheel.override {
inherit (self) buildPythonPackage flit-core;
};
#### END bootstrapping pkgs

automat = super.automat.overridePythonAttrs (
old: lib.optionalAttrs (lib.versionOlder old.version "22.10.0") {
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.m2r ];
Expand Down Expand Up @@ -1931,32 +1963,6 @@ lib.composeManyExtensions [
'';
});

installer = pkgs.python3.pkgs.installer.override {
inherit (self) buildPythonPackage flit-core;
};

build = pkgs.python3.pkgs.build.override {
inherit (self) buildPythonPackage flit-core packaging pyproject-hooks tomli;
};

flit-core = pkgs.python3.pkgs.flit-core.override {
inherit (self) buildPythonPackage flit;
};

packaging = pkgs.python3.pkgs.packaging.override {
inherit (self) buildPythonPackage flit-core;
};

tomli = self.callPackage ./tomli.nix { };

pyproject-hooks = pkgs.python3.pkgs.pyproject-hooks.override {
inherit (self) buildPythonPackage flit-core tomli;
};

wheel = pkgs.python3.pkgs.wheel.override {
inherit (self) buildPythonPackage flit-core;
};

pkgutil-resolve-name = super.pkgutil-resolve-name.overridePythonAttrs (
old: lib.optionalAttrs (!(old.src.isWheel or false)) {
postPatch = ''
Expand Down

0 comments on commit 880f0bd

Please sign in to comment.