mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 19:14:14 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
52 lines
1.4 KiB
Nix
52 lines
1.4 KiB
Nix
{ lib, stdenv, fetchurl, openssl, perl, which, dns-root-data }:
|
|
|
|
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 ];
|
|
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 = "http://www.nlnetlabs.nl/projects/ldns/";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ dtzWill ];
|
|
mainProgram = "drill";
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|