3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/iperf/3.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

2016-09-06 19:44:46 +01:00
{ stdenv, fetchurl, openssl, fetchpatch }:
2014-10-05 01:23:00 +01:00
stdenv.mkDerivation rec {
pname = "iperf";
version = "3.8.1";
2014-10-05 01:23:00 +01:00
src = fetchurl {
url = "https://downloads.es.net/pub/iperf/iperf-${version}.tar.gz";
sha256 = "15pdgnan9krf3dijan9in73ir8rcmhk3iw8085d732is4zrq1c75";
2014-10-05 01:23:00 +01:00
};
2017-11-05 23:52:13 +00:00
buildInputs = [ openssl ];
configureFlags = [
"--with-openssl=${openssl.dev}"
];
2017-11-05 23:52:13 +00:00
outputs = [ "out" "man" ];
2016-09-06 19:44:46 +01:00
patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
(fetchpatch {
2019-10-17 17:40:44 +01:00
url = "https://git.alpinelinux.org/aports/plain/main/iperf3/remove-pg-flags.patch?id=7f979fc51ae31d5c695d8481ba84a4afc5080efb";
2016-09-06 19:44:46 +01:00
name = "remove-pg-flags.patch";
2019-10-17 17:40:44 +01:00
sha256 = "0z3zsmf7ln08rg1mmzl8s8jm5gp8x62f5cxiqcmi8dcs2nsxwgbi";
2016-09-06 19:44:46 +01:00
})
];
2016-09-06 19:44:46 +01:00
2014-10-05 01:23:00 +01:00
postInstall = ''
ln -s $out/bin/iperf3 $out/bin/iperf
ln -s $man/share/man/man1/iperf3.1 $man/share/man/man1/iperf.1
2014-10-05 01:23:00 +01:00
'';
meta = with stdenv.lib; {
homepage = "http://software.es.net/iperf/";
2014-10-05 01:23:00 +01:00
description = "Tool to measure IP bandwidth using UDP or TCP";
platforms = platforms.unix;
license = licenses.bsd3;
maintainers = with maintainers; [ fpletz ];
2014-10-05 01:23:00 +01:00
};
}