Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 32 lines 696 B view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5}: 6 7stdenv.mkDerivation (finalAttrs: { 8 pname = "iperf"; 9 version = "2.2.1"; 10 11 src = fetchurl { 12 url = "mirror://sourceforge/iperf2/files/iperf-${finalAttrs.version}.tar.gz"; 13 hash = "sha256-dUqwp+KAM9vqgTCO9CS8ffTW4v4xtgzFNrYbUf772Ps="; 14 }; 15 16 configureFlags = [ "--enable-fastsampling" ]; 17 18 postInstall = '' 19 mv $out/bin/iperf $out/bin/iperf2 20 ln -s $out/bin/iperf2 $out/bin/iperf 21 ''; 22 23 meta = with lib; { 24 homepage = "https://sourceforge.net/projects/iperf/"; 25 description = "Tool to measure IP bandwidth using UDP or TCP"; 26 platforms = platforms.unix; 27 license = licenses.mit; 28 29 # prioritize iperf3 30 priority = 10; 31 }; 32})