Files
nixpkgs/pkgs/by-name/ld/ldns/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

71 lines
1.4 KiB
Nix

{
lib,
stdenv,
fetchurl,
openssl,
perl,
which,
dns-root-data,
autoreconfHook,
}:
stdenv.mkDerivation rec {
pname = "ldns";
version = "1.8.4";
src = fetchurl {
url = "https://www.nlnetlabs.nl/downloads/ldns/${pname}-${version}.tar.gz";
sha256 = "sha256-g4uQdZS6r/HNdn6VRmp3RZmK5kvHS+A43Mxi4t4uQkc=";
};
postPatch = ''
patchShebangs doc/doxyparse.pl
'';
outputs = [
"out"
"dev"
"man"
"examples"
];
nativeBuildInputs = [
perl
autoreconfHook
];
buildInputs = [ openssl ];
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"
];
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 = "https://www.nlnetlabs.nl/projects/ldns/";
license = licenses.bsd3;
maintainers = with maintainers; [ dtzWill ];
mainProgram = "drill";
platforms = platforms.unix;
};
}