libapparmor: fix build if doCheck = false (e.g. on cross)

This is a HACK. The correct fix is #401980,
but causes rebuilds and therefore is unsuitable for staging-next.
This commit is contained in:
Grimmauld
2025-04-26 16:30:24 +02:00
parent 7c9ec67ff8
commit 61857a9832

View File

@@ -58,6 +58,16 @@ stdenv.mkDerivation (finalAttrs: {
]
++ lib.optionals withPython [
python3Packages.setuptools
]
++ lib.optionals (!finalAttrs.finalPackage.doCheck) [
# TODO FIXME This is a super ugly HACK.
# perl is required for podchecker.
# It is a native build input on native platform because checks are enabled there.
# Checks can't be enabled on cross, but moving perl to
# nativeCheckInputs causes rebuilds on native compile.
# Thus, hacks!
# This should just be made unconditional and removed from nativeCheckInputs.
perl
];
nativeCheckInputs = [