4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
50 lines
1.3 KiB
Nix
50 lines
1.3 KiB
Nix
{ lib, stdenv, fetchurl, fetchFromGitHub, autoreconfHook, pkgconfig
|
|
, openssl, ldns
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "dnsperf";
|
|
version = "2.4.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 = "0q7zmzhhx71v41wf6rhyvpil43ch4a9sx21x47wgcg362lca3cbz";
|
|
};
|
|
|
|
outputs = [ "out" "man" "doc" ];
|
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
|
|
|
buildInputs = [
|
|
openssl
|
|
ldns # optional for DDNS (but cheap anyway)
|
|
];
|
|
|
|
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 ];
|
|
};
|
|
}
|