2024-06-30 08:16:52 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
|
|
|
openssl,
|
|
|
|
perl,
|
|
|
|
which,
|
|
|
|
dns-root-data,
|
|
|
|
}:
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ldns";
|
|
|
|
version = "1.8.3";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.nlnetlabs.nl/downloads/ldns/${pname}-${version}.tar.gz";
|
|
|
|
sha256 = "sha256-w/ct0QNrKQfjpW5qz537LlUSVrPBu9l4eULe7rcOeGA=";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs doc/doxyparse.pl
|
|
|
|
'';
|
|
|
|
|
2024-06-30 08:16:52 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"dev"
|
|
|
|
"man"
|
|
|
|
"examples"
|
|
|
|
];
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ perl ];
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
2024-06-30 08:16:52 +00:00
|
|
|
configureFlags =
|
|
|
|
[
|
|
|
|
"--with-ssl=${openssl.dev}"
|
|
|
|
"--with-trust-anchor=${dns-root-data}/root.key"
|
|
|
|
"--with-drill"
|
|
|
|
"--disable-gost"
|
|
|
|
"--with-examples"
|
|
|
|
]
|
|
|
|
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
|
|
|
"ac_cv_func_malloc_0_nonnull=yes"
|
|
|
|
"ac_cv_func_realloc_0_nonnull=yes"
|
|
|
|
];
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [ 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 lib; {
|
|
|
|
description = "Library with the aim of simplifying DNS programming in C";
|
|
|
|
homepage = "http://www.nlnetlabs.nl/projects/ldns/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ dtzWill ];
|
|
|
|
mainProgram = "drill";
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|