2019-01-25 16:09:55 +01:00
|
|
|
{ stdenv, fetchurl, fetchFromGitHub, autoreconfHook
|
|
|
|
, bind, libseccomp, zlib, openssl, libcap
|
|
|
|
}:
|
2016-12-08 19:13:42 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "dnsperf-${version}";
|
2019-01-25 16:09:55 +01:00
|
|
|
version = "2.2.0";
|
2016-12-08 19:13:42 +01:00
|
|
|
|
2019-01-16 12:59:36 +01:00
|
|
|
# The same as the initial commit of the new GitHub repo (only readme changed).
|
2019-01-25 16:09:55 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "DNS-OARC";
|
|
|
|
repo = "dnsperf";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1acbpgk1d7hjs48j3w6xkmyf9xlxhqskjy50a16f9dvjwvvxp84b";
|
2016-12-08 19:13:42 +01:00
|
|
|
};
|
|
|
|
|
2017-07-11 11:14:14 +02:00
|
|
|
outputs = [ "out" "man" "doc" ];
|
2016-12-08 19:13:42 +01:00
|
|
|
|
2019-01-25 16:09:55 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2018-06-11 02:32:17 +02:00
|
|
|
buildInputs = [ bind zlib openssl ]
|
2019-01-16 12:59:36 +01:00
|
|
|
++ stdenv.lib.optionals stdenv.isLinux [ libcap.lib ];
|
2016-12-08 19:13:42 +01:00
|
|
|
|
2019-01-25 16:09:55 +01: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/"
|
2016-12-08 19:13:42 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2019-01-25 16:09:55 +01:00
|
|
|
outputsToInstall = outputs; # The man pages and docs are likely useful to most.
|
2016-12-08 19:13:42 +01:00
|
|
|
|
|
|
|
description = "Tools for DNS benchmaring";
|
2019-01-16 12:59:36 +01:00
|
|
|
homepage = "https://github.com/DNS-OARC/dnsperf";
|
2016-12-08 19:13:42 +01:00
|
|
|
license = licenses.isc;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.vcunat ];
|
|
|
|
};
|
|
|
|
}
|