2016-09-06 19:44:46 +01:00
|
|
|
{ stdenv, fetchurl, openssl, fetchpatch }:
|
2014-10-05 01:23:00 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-07-01 19:51:47 +01:00
|
|
|
name = "iperf-3.7";
|
2014-10-05 01:23:00 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-28 19:43:35 +01:00
|
|
|
url = "https://downloads.es.net/pub/iperf/${name}.tar.gz";
|
2019-07-01 19:51:47 +01:00
|
|
|
sha256 = "033is7b5grfbiil98jxlz4ixp9shm44x6hy8flpsyz1i4h108inq";
|
2014-10-05 01:23:00 +01:00
|
|
|
};
|
|
|
|
|
2017-11-05 23:52:13 +00:00
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
2019-06-03 14:50:48 +01:00
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
2016-09-06 19:44:46 +01:00
|
|
|
patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
|
|
|
|
(fetchpatch {
|
2019-01-30 15:23:24 +00:00
|
|
|
url = "https://git.alpinelinux.org/aports/plain/main/iperf3/remove-pg-flags.patch?id=99ec9e1c84e338629cf1b27b0fdc808bde4d8564";
|
2016-09-06 19:44:46 +01:00
|
|
|
name = "remove-pg-flags.patch";
|
2019-01-30 15:23:24 +00:00
|
|
|
sha256 = "0b3vcw1pdyk10764p4vlglwi1acrm7wz2jjd6li7p11v4rggrb5c";
|
2016-09-06 19:44:46 +01:00
|
|
|
})
|
2018-02-21 18:35:59 +00:00
|
|
|
];
|
2016-09-06 19:44:46 +01:00
|
|
|
|
2014-10-05 01:23:00 +01:00
|
|
|
postInstall = ''
|
2019-06-03 14:50:48 +01: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 01:23:00 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2019-01-26 10:01:09 +00:00
|
|
|
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 = "as-is";
|
2019-01-26 10:01:09 +00:00
|
|
|
maintainers = with maintainers; [ fpletz ];
|
2014-10-05 01:23:00 +01:00
|
|
|
};
|
|
|
|
}
|