nixpkgs/pkgs/development/libraries/ldns/default.nix
Will Dietz dc9e2c38e5
ldns: 1.7.0 -> 1.7.1
https://www.nlnetlabs.nl/news/2019/Jul/26/ldns-1.7.1-released/

* examples no longer can be configured separately,
  so build everything we want in a single go
  and sort into the appropriate outputs after.
* libtool file doesn't seem to reference openssl at all
  so nothing to patch up there as we did previously.
2019-11-19 21:51:05 -06:00

51 lines
1.3 KiB
Nix

{ 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
'';
outputs = [ "out" "dev" "man" "examples" ];
nativeBuildInputs = [ perl ];
buildInputs = [ openssl ];
configureFlags = [
"--with-ssl=${openssl.dev}"
"--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"
];
checkInputs = [ which ];
doCheck = false; # fails. missing some files
postInstall = ''
# Only 'drill' stays in $out
# the rest are examples:
moveToOutput "bin/ldns*" "$examples"
# with exception of ldns-config, which goes to $dev:
moveToOutput "bin/ldns-config" "$dev"
'';
meta = with stdenv.lib; {
description = "Library with the aim of simplifying DNS programming in C";
license = licenses.bsd3;
homepage = http://www.nlnetlabs.nl/projects/ldns/;
platforms = platforms.unix;
maintainers = with maintainers; [ ];
};
}