apparmor: make apparmor cross-compile

This commit is contained in:
Ding Xiang Fei
2019-06-29 19:17:21 +08:00
parent d3157cbede
commit 63fcc2a0a9
2 changed files with 23 additions and 2 deletions
+4 -2
View File
@@ -49,7 +49,9 @@ let
sha256 = "1m4dx901biqgnr4w4wz8a2z9r9dxyw7wv6m6mqglqwf2lxinqmp4";
})
# (alpine patches {1,4,5,6,8} are needed for apparmor 2.11, but not 2.12)
];
] ++ [
./cross.patch
];
# Set to `true` after the next FIXME gets fixed or this gets some
# common derivation infra. Too much copy-paste to fix one by one.
@@ -185,7 +187,7 @@ let
'';
inherit patches;
postPatch = "cd ./parser";
makeFlags = ''LANGS= USE_SYSTEM=1 INCLUDEDIR=${libapparmor}/include'';
makeFlags = ''LANGS= USE_SYSTEM=1 INCLUDEDIR=${libapparmor}/include AR=${stdenv.cc.bintools.targetPrefix}ar'';
installFlags = ''DESTDIR=$(out) DISTRO=unknown'';
inherit doCheck;