anchor.diff: -{ stdenv, fetchurl, fetchpatch, autoreconfHook, file, openssl, perl, perlPackages, unzip, nettools, ncurses }:
  +{ stdenv, fetchurl, fetchpatch, autoreconfHook, removeReferencesTo
  +, file, openssl, perl, perlPackages, unzip, nettools, ncurses }:
   
   stdenv.mkDerivation rec {
     name = "net-snmp-5.8";
  
positive.code:     ./0002-autoconf-version.patch
    ];
  
    configureFlags =
      [ "--with-default-snmp-version=3"
        "--with-sys-location=Unknown"
  
negative.code:     substituteInPlace testing/fulltests/support/simple_TESTCONF.sh --replace "/bin/netstat" "${nettools}/bin/netstat"
    '';
  
    nativeBuildInputs = [ autoreconfHook nettools removeReferencesTo ];
    buildInputs = with perlPackages; [ file perl unzip openssl ncurses JSON Tk TermReadKey ];
  
    enableParallelBuilding = true;
    doCheck = false;  # tries to use networking
  
    postInstall = ''
      for f in "$lib/lib/"*.la $bin/bin/net-snmp-config $bin/bin/net-snmp-create-v3-user; do
        sed 's|-L${openssl.dev}|-L${openssl.out}|g' -i $f
      done
      mkdir $dev/bin
      mv $bin/bin/net-snmp-config $dev/bin
      # libraries contain configure options
      find $lib/lib -type f -exec remove-references-to -t $bin '{}' +
      find $lib/lib -type f -exec remove-references-to -t $dev '{}' +
    '';
  
    meta = with stdenv.lib; {
  