2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, fetchurl, fetchFromGitHub, autoreconfHook, pkgconfig
|
2020-12-25 13:55:36 +00:00
|
|
|
, openssl, ldns
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dnsperf";
|
2020-12-25 13:55:36 +00:00
|
|
|
version = "2.4.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# The same as the initial commit of the new GitHub repo (only readme changed).
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "DNS-OARC";
|
|
|
|
repo = "dnsperf";
|
|
|
|
rev = "v${version}";
|
2020-12-25 13:55:36 +00:00
|
|
|
sha256 = "0q7zmzhhx71v41wf6rhyvpil43ch4a9sx21x47wgcg362lca3cbz";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "man" "doc" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
ldns # optional for DDNS (but cheap anyway)
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# For now, keep including the old PDFs as well.
|
|
|
|
# https://github.com/DNS-OARC/dnsperf/issues/27
|
|
|
|
postInstall = let
|
|
|
|
src-doc = fetchurl {
|
|
|
|
url = "ftp://ftp.nominum.com/pub/nominum/dnsperf/2.1.0.0/"
|
|
|
|
+ "dnsperf-src-2.1.0.0-1.tar.gz";
|
|
|
|
sha256 = "03kfc65s5a9csa5i7xjsv0psq144k8d9yw7xlny61bg1h2kg1db4";
|
|
|
|
};
|
|
|
|
in ''
|
|
|
|
tar xf '${src-doc}'
|
|
|
|
cp ./dnsperf-src-*/doc/*.pdf "$doc/share/doc/dnsperf/"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
outputsToInstall = outputs; # The man pages and docs are likely useful to most.
|
|
|
|
|
|
|
|
description = "Tools for DNS benchmaring";
|
|
|
|
homepage = "https://github.com/DNS-OARC/dnsperf";
|
|
|
|
license = licenses.isc;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.vcunat ];
|
|
|
|
};
|
|
|
|
}
|