python3Packages.libapparmor: fix cross compilation

the previous code was supplying unspliced `python` (as a buildInput)
and `setuptools` (as a nativeBuildInput) all from the same package set.
in the case of
`pkgsCross.aarch64-multiplatform.python3Packages.libapparmor`, that
results in an aarch64 `setuptools` hook attempting to be run on the
(x86_64) build machine.

by going through `callPackage`, we can supply `pkgs.libapparmor` with
spliced versions of these inputs that are suitable for either
buildInputs/nativeBuildInputs/etc.
This commit is contained in:
Colin
2026-01-04 09:47:56 +00:00
parent 20e4031f28
commit f3fcd71c7a
+12 -5
View File
@@ -8433,11 +8433,18 @@ self: super: with self; {
libais = callPackage ../development/python-modules/libais { };
libapparmor = toPythonModule (
pkgs.libapparmor.override {
python3Packages = self;
}
);
libapparmor = callPackage (
{
python,
pythonImportsCheckHook,
setuptools,
}@python3Packages:
toPythonModule (
pkgs.libapparmor.override {
inherit python3Packages;
}
)
) { };
libarchive-c = callPackage ../development/python-modules/libarchive-c {
inherit (pkgs) libarchive;