diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2019-01-25 16:09:55 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2019-01-25 16:26:41 +0100 |
commit | 094655161200179abe49a626146e0371e3361c58 (patch) | |
tree | 7b89d831b54841f0c01ca5650063753c1f9b45f4 /pkgs/tools | |
parent | 7b32546a3da37aeea18e75db4ebcd9b0e57e36b4 (diff) | |
download | nixlib-094655161200179abe49a626146e0371e3361c58.tar nixlib-094655161200179abe49a626146e0371e3361c58.tar.gz nixlib-094655161200179abe49a626146e0371e3361c58.tar.bz2 nixlib-094655161200179abe49a626146e0371e3361c58.tar.lz nixlib-094655161200179abe49a626146e0371e3361c58.tar.xz nixlib-094655161200179abe49a626146e0371e3361c58.tar.zst nixlib-094655161200179abe49a626146e0371e3361c58.zip |
dnsperf: 2.1.0.0 -> 2.2.0
I tested performance with resperf for a while.
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/networking/dnsperf/default.nix | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/pkgs/tools/networking/dnsperf/default.nix b/pkgs/tools/networking/dnsperf/default.nix index 4dba58140459..77e61aaf3470 100644 --- a/pkgs/tools/networking/dnsperf/default.nix +++ b/pkgs/tools/networking/dnsperf/default.nix @@ -1,37 +1,40 @@ -{ stdenv, fetchurl, bind, libseccomp, zlib, openssl, libcap }: +{ stdenv, fetchurl, fetchFromGitHub, autoreconfHook +, bind, libseccomp, zlib, openssl, libcap +}: stdenv.mkDerivation rec { name = "dnsperf-${version}"; - version = "2.1.0.0"; + version = "2.2.0"; # The same as the initial commit of the new GitHub repo (only readme changed). - src = fetchurl { - url = "ftp://ftp.nominum.com/pub/nominum/dnsperf/${version}/" - + "dnsperf-src-${version}-1.tar.gz"; - sha256 = "03kfc65s5a9csa5i7xjsv0psq144k8d9yw7xlny61bg1h2kg1db4"; + src = fetchFromGitHub { + owner = "DNS-OARC"; + repo = "dnsperf"; + rev = "v${version}"; + sha256 = "1acbpgk1d7hjs48j3w6xkmyf9xlxhqskjy50a16f9dvjwvvxp84b"; }; - # Almost the same as https://github.com/DNS-OARC/dnsperf/pull/12 - postPatch = '' - find . -name '*.h' -o -name '*.c' | xargs sed \ - -e 's/\<isc_boolean_t\>/bool/g' -e 's/\<ISC_TRUE\>/true/g' -e 's/\<ISC_FALSE\>/false/g' \ - -e 's/\<isc_uint/uint/g' -e 's/\<ISC_UINT/UINT/g' -e 's/\<isc_int/int/g' \ - -e 's/\<ISC_PRINT_QUADFORMAT\>/PRIu64/g' -e 's/\<ISC_TF\>//g' \ - -i -- - ''; - outputs = [ "out" "man" "doc" ]; + nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ bind zlib openssl ] ++ stdenv.lib.optionals stdenv.isLinux [ libcap.lib ]; - postInstall = '' - mkdir -p "$out/share/doc/" - cp -r ./doc "$out/share/doc/dnsperf" + # 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 PDFs are likely useful to most. + outputsToInstall = outputs; # The man pages and docs are likely useful to most. description = "Tools for DNS benchmaring"; homepage = "https://github.com/DNS-OARC/dnsperf"; |