anchor.diff:      "--with-trust-anchor=${dns-root-data}/root.key"
       "--with-drill"
       "--disable-gost"
  +    "--with-examples"
     ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
       "ac_cv_func_malloc_0_nonnull=yes"
       "ac_cv_func_realloc_0_nonnull=yes"
  
positive.code:   doCheck = false; # fails. missing some files
  
    postInstall = ''
      moveToOutput "bin/ldns-config" "$dev"
  
      pushd examples
      configureFlagsArray+=( "--bindir=$examples/bin" )
      configurePhase
      make
      make install
      popd
  
      sed -i "$out/lib/libldns.la" -e "s,-L${openssl.dev},-L${openssl.out},g"
    '';
  
    meta = with stdenv.lib; {
  
negative.code: { stdenv, fetchurl, openssl, perl, which, dns-root-data }:
  
  stdenv.mkDerivation rec {
    pname = "ldns";
    version = "1.7.1";
  
    src = fetchurl {
      url = "https://www.nlnetlabs.nl/downloads/ldns/${pname}-${version}.tar.gz";
      sha256 = "0ac242n7996fswq1a3nlh1bbbhrsdwsq4mx7xq8ffq6aplb4rj4a";
    };
  
    postPatch = ''
      patchShebangs doc/doxyparse.pl
  