From 61857a983232bf6f0408ef442cc6f6ebdcc9afd3 Mon Sep 17 00:00:00 2001 From: Grimmauld Date: Sat, 26 Apr 2025 16:30:24 +0200 Subject: [PATCH] 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. --- pkgs/by-name/li/libapparmor/package.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/by-name/li/libapparmor/package.nix b/pkgs/by-name/li/libapparmor/package.nix index 500aa9b45d9c..d9d27fdd6b79 100644 --- a/pkgs/by-name/li/libapparmor/package.nix +++ b/pkgs/by-name/li/libapparmor/package.nix @@ -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 = [