nixpkgs/pkgs/tools/networking/iperf/3.nix
Muhammad Falak R Wani 2e1b3d05f0 iperf: 3.15 -> 3.16
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
2023-12-27 10:55:53 +05:30

40 lines
1.2 KiB
Nix

{ lib, stdenv, fetchurl, openssl, fetchpatch, lksctp-tools }:
stdenv.mkDerivation rec {
pname = "iperf";
version = "3.16";
src = fetchurl {
url = "https://downloads.es.net/pub/iperf/iperf-${version}.tar.gz";
hash = "sha256-zHQMa76hBDmMw+RmvvxRWiWJbsheRKZi1fSnZ7nPcT4=";
};
buildInputs = [ openssl ] ++ lib.optionals stdenv.isLinux [ lksctp-tools ];
configureFlags = [
"--with-openssl=${openssl.dev}"
];
outputs = [ "out" "man" ];
patches = lib.optionals stdenv.hostPlatform.isMusl [
(fetchpatch {
url = "https://git.alpinelinux.org/aports/plain/main/iperf3/remove-pg-flags.patch?id=7f979fc51ae31d5c695d8481ba84a4afc5080efb";
name = "remove-pg-flags.patch";
sha256 = "0z3zsmf7ln08rg1mmzl8s8jm5gp8x62f5cxiqcmi8dcs2nsxwgbi";
})
];
postInstall = ''
ln -s $out/bin/iperf3 $out/bin/iperf
ln -s $man/share/man/man1/iperf3.1 $man/share/man/man1/iperf.1
'';
meta = with lib; {
homepage = "https://software.es.net/iperf/";
description = "Tool to measure IP bandwidth using UDP or TCP";
platforms = platforms.unix;
license = licenses.bsd3;
maintainers = with maintainers; [ fpletz ];
};
}