@@ -49,7 +49,9 @@ let
4949 sha256 = "1m4dx901biqgnr4w4wz8a2z9r9dxyw7wv6m6mqglqwf2lxinqmp4";
5050 })
5151 # (alpine patches {1,4,5,6,8} are needed for apparmor 2.11, but not 2.12)
52− ];
52+ ] ++ [
53+ ./cross.patch
54+ ];
5355
5456 # Set to `true` after the next FIXME gets fixed or this gets some
5557 # common derivation infra. Too much copy-paste to fix one by one.
@@ -185,7 +187,7 @@ let
185187 '';
186188 inherit patches;
187189 postPatch = "cd ./parser";
188− makeFlags = ''LANGS= USE_SYSTEM=1 INCLUDEDIR=${libapparmor}/include'';
190+ makeFlags = ''LANGS= USE_SYSTEM=1 INCLUDEDIR=${libapparmor}/include AR=${stdenv.cc.bintools.targetPrefix}ar'';
189191 installFlags = ''DESTDIR=$(out) DISTRO=unknown'';
190192
191193 inherit doCheck;