depot/third_party/nixpkgs/pkgs/tools/networking/dnsperf/default.nix
Default email 07d6a74cbb Project import generated by Copybara.
GitOrigin-RevId: f5e8bdd07d1afaabf6b37afc5497b1e498b8046f
2021-03-19 18:17:44 +01:00

51 lines
1.3 KiB
Nix

{ lib, stdenv, fetchurl, fetchFromGitHub, autoreconfHook, pkg-config
, openssl, ldns, libck
}:
stdenv.mkDerivation rec {
pname = "dnsperf";
version = "2.5.0";
# The same as the initial commit of the new GitHub repo (only readme changed).
src = fetchFromGitHub {
owner = "DNS-OARC";
repo = "dnsperf";
rev = "v${version}";
sha256 = "0wcjs512in9w36hbn4mffca02cn5df3s1x7zaj02qv8na5nqq11m";
};
outputs = [ "out" "man" "doc" ];
nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = [
openssl
ldns # optional for DDNS (but cheap anyway)
libck
];
doCheck = true;
# 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 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 ];
};
}