From ce8e2c978b9417d6fae52cc6360ff7bee6ef1ae8 Mon Sep 17 00:00:00 2001 From: Grimmauld Date: Sat, 10 May 2025 09:45:17 +0200 Subject: [PATCH] apparmor: fix cross for different bit depths between build and host Fixes #405780 Void also does not attempt to enable python on cross for armv7 [1]. This means apparmor-parser will never work on cross. [1] https://github.com/void-linux/void-packages/blob/f8130e11caa853e434dc0ecdfb229d8fcd29c7de/srcpkgs/apparmor/template#L32-L36 --- pkgs/by-name/li/libapparmor/package.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/li/libapparmor/package.nix b/pkgs/by-name/li/libapparmor/package.nix index 99aa886a8eaa..b7c4b3db494e 100644 --- a/pkgs/by-name/li/libapparmor/package.nix +++ b/pkgs/by-name/li/libapparmor/package.nix @@ -12,7 +12,11 @@ stdenv.hostPlatform == stdenv.buildPlatform && lib.meta.availableOn stdenv.hostPlatform perl, perl, withPython ? - !stdenv.hostPlatform.isStatic && lib.meta.availableOn stdenv.hostPlatform python3Packages.python, + # static can't load python libraries + !stdenv.hostPlatform.isStatic + && lib.meta.availableOn stdenv.hostPlatform python3Packages.python + # m4 python include script fails if cpu bit depth is different across machines + && stdenv.hostPlatform.parsed.cpu.bits == stdenv.buildPlatform.parsed.cpu.bits, python3Packages, swig, ncurses,