2016-09-06 20:44:46 +02:00
|
|
|
{ stdenv, fetchurl, openssl, fetchpatch }:
|
2014-10-05 02:23:00 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-06-09 20:20:38 +02:00
|
|
|
pname = "iperf";
|
2020-10-19 12:24:49 +02:00
|
|
|
version = "3.9";
|
2014-10-05 02:23:00 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-06-09 20:20:38 +02:00
|
|
|
url = "https://downloads.es.net/pub/iperf/iperf-${version}.tar.gz";
|
2020-10-19 12:24:49 +02:00
|
|
|
sha256 = "0f601avdmzpwsa3lbi0ppjhkrdipm5wifhhxy5czf99370k3mdi4";
|
2014-10-05 02:23:00 +02:00
|
|
|
};
|
|
|
|
|
2017-11-06 00:52:13 +01:00
|
|
|
buildInputs = [ openssl ];
|
2020-01-13 02:51:58 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--with-openssl=${openssl.dev}"
|
|
|
|
];
|
2017-11-06 00:52:13 +01:00
|
|
|
|
2019-06-03 15:50:48 +02:00
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
2016-09-06 20:44:46 +02:00
|
|
|
patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
|
|
|
|
(fetchpatch {
|
2019-10-17 18:40:44 +02:00
|
|
|
url = "https://git.alpinelinux.org/aports/plain/main/iperf3/remove-pg-flags.patch?id=7f979fc51ae31d5c695d8481ba84a4afc5080efb";
|
2016-09-06 20:44:46 +02:00
|
|
|
name = "remove-pg-flags.patch";
|
2019-10-17 18:40:44 +02:00
|
|
|
sha256 = "0z3zsmf7ln08rg1mmzl8s8jm5gp8x62f5cxiqcmi8dcs2nsxwgbi";
|
2016-09-06 20:44:46 +02:00
|
|
|
})
|
2018-02-21 19:35:59 +01:00
|
|
|
];
|
2016-09-06 20:44:46 +02:00
|
|
|
|
2014-10-05 02:23:00 +02:00
|
|
|
postInstall = ''
|
2019-06-03 15:50:48 +02:00
|
|
|
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 02:23:00 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://software.es.net/iperf/";
|
2014-10-05 02:23:00 +02:00
|
|
|
description = "Tool to measure IP bandwidth using UDP or TCP";
|
|
|
|
platforms = platforms.unix;
|
2019-11-24 11:58:38 +01:00
|
|
|
license = licenses.bsd3;
|
2019-01-26 11:01:09 +01:00
|
|
|
maintainers = with maintainers; [ fpletz ];
|
2014-10-05 02:23:00 +02:00
|
|
|
};
|
|
|
|
}
|