anchor.diff:      done
     '';
   
  -  preInstall = '' makeFlags="$makeFlags PREFIX=$out DESTDIR=$out" '';
  +  postPatch = optionalString enablePython ''
  +    sed -i -e 's|\$(LIBDIR)/libsepol.a|${libsepol}/lib/libsepol.a|' src/Makefile
  +  '';
  +
  +  installFlags = [ "PREFIX=$(out)" "DESTDIR=$(out)" "LIBSEPOLDIR=${libsepol}" ];
  +  installTargets = [ "install" ] ++ optional enablePython "install-pywrap";
   
     meta = {
       inherit (libsepol.meta) homepage platforms maintainers;
  
positive.code: { stdenv, fetchurl, pkgconfig, libsepol, pcre }:
  
  stdenv.mkDerivation rec {
    name = "libselinux-${version}";
  
negative.code: 
    patches = [ ./fPIC.patch ]; # libsemanage seems to need -fPIC everywhere
  
    buildInputs = [ pkgconfig libsepol pcre ]
               ++ optionals enablePython [ swig python ];
  
    prePatch = ''
      tar xvf ${patch_src}
  