1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 14:11:36 +00:00
nixpkgs/pkgs/tools/networking/iperf/3.nix

42 lines
1.2 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 {
2018-02-17 20:33:14 +00:00
name = "iperf-3.4";
2014-10-05 01:23:00 +01:00
src = fetchurl {
url = "http://downloads.es.net/pub/iperf/${name}.tar.gz";
2018-02-17 20:33:14 +00:00
sha256 = "04ciywjhklzfrnp40675ssnkqxv90ad4v56i8vh8bpsiswr86lki";
2014-10-05 01:23:00 +01:00
};
2017-11-05 23:52:13 +00:00
buildInputs = [ openssl ];
2016-09-06 19:44:46 +01:00
preConfigure = stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
NIX_CFLAGS_COMPILE+=" -D_GNU_SOURCE"
'';
patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
(fetchpatch {
url = "http://git.alpinelinux.org/cgit/aports/plain/main/iperf3/build-fixes.patch";
name = "fix-musl-build.patch";
sha256 = "0zvfjnqdldh6rc6qggyb310swdnl9qk0m3z1kklnqzgjsh8dskvl";
})
(fetchpatch {
url = "http://git.alpinelinux.org/cgit/aports/plain/main/iperf3/remove-pg-flags.patch";
name = "remove-pg-flags.patch";
sha256 = "0lnczhass24kgq59drgdipnhjnw4l1cy6gqza7f2ah1qr4q104rm";
})
];
2014-10-05 01:23:00 +01:00
postInstall = ''
ln -s iperf3 $out/bin/iperf
'';
meta = with stdenv.lib; {
homepage = http://software.es.net/iperf/;
description = "Tool to measure IP bandwidth using UDP or TCP";
platforms = platforms.unix;
license = "as-is";
2016-06-23 20:05:06 +01:00
maintainers = with maintainers; [ wkennington fpletz ];
2014-10-05 01:23:00 +01:00
};
}