anchor.diff:      buildInputs = [ libapparmor ];
   
       prePatch = prePatchCommon + ''
  -      substituteInPlace ./parser/Makefile --replace "/usr/bin/bison" "${bison}/bin/bison"
  -      substituteInPlace ./parser/Makefile --replace "/usr/bin/flex" "${flex}/bin/flex"
  -      substituteInPlace ./parser/Makefile --replace "/usr/include/linux/capability.h" "${linuxHeaders}/include/linux/capability.h"
         ## techdoc.pdf still doesn't build ...
  -      substituteInPlace ./parser/Makefile --replace "manpages htmlmanpages pdf" "manpages htmlmanpages"
  +      substituteInPlace ./parser/Makefile \
  +        --replace "/usr/bin/bison" "${bison}/bin/bison" \
  +        --replace "/usr/bin/flex" "${flex}/bin/flex" \
  +        --replace "/usr/include/linux/capability.h" "${linuxHeaders}/include/linux/capability.h" \
  +        --replace "manpages htmlmanpages pdf" "manpages htmlmanpages"
         substituteInPlace parser/rc.apparmor.functions \
          --replace "/sbin/apparmor_parser" "$out/bin/apparmor_parser"
         sed -i parser/rc.apparmor.functions -e '2i . ${./fix-rc.apparmor.functions.sh}'
       '';
       inherit patches;
  -    postPatch = "cd ./parser";
  +    postPatch = ''
  +      cd ./parser
  +    '';
       makeFlags = [
         "LANGS=" "USE_SYSTEM=1" "INCLUDEDIR=${libapparmor}/include"
         "AR=${stdenv.cc.bintools.targetPrefix}ar"
  
positive.code:       perl
      ] ++ lib.optional withPython python3;
  
      buildInputs = []
        ++ lib.optional withPerl perl
        ++ lib.optional withPython python3;
  
      # required to build apparmor-parser
  
negative.code:   };
  
    apparmor-utils = stdenv.mkDerivation {
      pname = "apparmor-utils";
      version = apparmor-version;
  
      src = apparmor-sources;
  
      strictDeps = true;
  