Commit 16dddda5 authored by Colin's avatar Colin
Browse files

apparmor-parser: enable `strictDeps`

bash, perl and python are all shebangs used by the test scripts
hence they're moved to `nativeCheckInputs` so that they can be on PATH.

runtimeShellPackage is added to `buildInputs` to fix the shebang
in $out/lib/apparmor/rc.apparmor.function. prior to this, its `#!/bin/sh`
shebang was being patched via the bash from `checkInputs`. that's flimsy
as it relies on `doCheck == true` (which is false e.g. when cross
compiling). instead, provide a shell in `buildInputs` to ensure patching
of `#!/bin/sh` in runtime scripts.
parent 6213e97a
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
  # apparmor deps
  libapparmor,
  apparmor-bin-utils,
  runtimeShellPackage,

  # testing
  perl,
@@ -39,7 +40,10 @@ stdenv.mkDerivation (finalAttrs: {
    which
  ];

  buildInputs = [ libapparmor ];
  buildInputs = [
    libapparmor
    runtimeShellPackage
  ];

  makeFlags = [
    "LANGS="
@@ -64,12 +68,14 @@ stdenv.mkDerivation (finalAttrs: {
  postCheck = "popd";

  doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
  checkInputs = [
  nativeCheckInputs = [
    bashInteractive
    perl
    python3
  ];

  strictDeps = true;

  meta = libapparmor.meta // {
    description = "Mandatory access control system - core library";
    mainProgram = "apparmor_parser";