anchor.diff:    };
   
     prePatchCommon = ''
  -    substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2man" "${perl}/bin/pod2man"
  -    substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2html" "${perl}/bin/pod2html"
  +    substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2man" "${buildPackages.perl}/bin/pod2man"
  +    substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2html" "${buildPackages.perl}/bin/pod2html"
       substituteInPlace ./common/Make.rules --replace "/usr/include/linux/capability.h" "${linuxHeaders}/include/linux/capability.h"
       substituteInPlace ./common/Make.rules --replace "/usr/share/man" "share/man"
     '';
  
positive.code: , swig
  , ncurses
  , pam
  }:
  
  let
  
negative.code:     inherit patches;
  
      postPatch = "cd ./libraries/libapparmor";
      # https://gitlab.com/apparmor/apparmor/issues/1
      configureFlags = stdenv.lib.optionalString (!stdenv.isCross) "--with-python --with-perl";
  
      outputs = if stdenv.isCross then [ "out" ] else [ "out" "python" ];
  
      postInstall = stdenv.lib.optionalString (!stdenv.isCross) ''
        mkdir -p $python/lib
        mv $out/lib/python* $python/lib/
      '';
  