anchor.diff:      "--enable-pie"
       "--enable-relro-now"
       "--with-pyunbound"
  -    "DESTDIR=$out PREFIX="
  +    "DESTDIR=$out"
  +    "PREFIX="
     ];
   
     preInstall = ''
       mkdir -p $out/${python.sitePackages} $out/etc/${pname}
       cp .libs/_unbound.so .libs/libunbound.so* $out/${python.sitePackages}
       substituteInPlace _unbound.la \
  -      --replace "-L.libs $PWD/libunbound.la" "-L$out/${python.sitePackages}" \
  -      --replace "libdir=\'$PWD/${python.sitePackages}\'" "libdir=\'$out/${python.sitePackages}\'"
  +      --replace "-L.libs $PWD/libunbound.la" "-L$out/${python.sitePackages}"
       '';
   
  -  installFlags = [ "configfile=\${out}/etc/unbound/unbound.conf pyunbound-install lib" ];
  +  installFlags = [
  +    "configfile=\${out}/etc/unbound/unbound.conf"
  +    "pyunbound-install"
  +    "lib"
  +  ];
   
     # All we want is the Unbound Python module
     postInstall = ''
  
positive.code:     # We don't need anything else
      rm -fR $out/bin $out/share $out/include $out/etc/unbound
      patchelf --replace-needed libunbound.so.8 $out/${python.sitePackages}/libunbound.so.8 $out/${python.sitePackages}/_unbound.so
      '';
  
    meta = with lib; {
      description = "Python library for Unbound, the validating, recursive, and caching DNS resolver";
  
negative.code:     sha256 = "sha256-hQTZe4/FvYlzRcldEW4O4N34yP+ZWQqytL0TJ4yfULg=";
    };
  
    nativeBuildInputs = [ swig ];
  
    buildInputs = [ openssl expat libevent python ];
  
    postPatch = ''substituteInPlace Makefile.in \
      --replace "\$(DESTDIR)\$(PYTHON_SITE_PKG)" "$out/${python.sitePackages}" \
      --replace "\$(LIBTOOL) --mode=install cp _unbound.la" "cp _unbound.la"
    '';
  
    preConfigure = "export PYTHON_VERSION=${python.pythonVersion}";
  
  