From ff132824f2ede76b8071c9350594122d92f9562a Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Tue, 4 Jun 2019 14:37:04 +0200 Subject: [PATCH] iperf2: make binary symlink & prioritize iperf3 If both are in the environment, iperf3 should be used as `bin/iperf` by default, for more consistency. --- pkgs/tools/networking/iperf/2.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/tools/networking/iperf/2.nix b/pkgs/tools/networking/iperf/2.nix index 9faa0f95351..6494b907a3a 100644 --- a/pkgs/tools/networking/iperf/2.nix +++ b/pkgs/tools/networking/iperf/2.nix @@ -11,10 +11,18 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; configureFlags = [ "--enable-fastsampling" ]; + postInstall = '' + mv $out/bin/iperf $out/bin/iperf2 + ln -s $out/bin/iperf2 $out/bin/iperf + ''; + meta = with stdenv.lib; { homepage = https://sourceforge.net/projects/iperf/; description = "Tool to measure IP bandwidth using UDP or TCP"; platforms = platforms.unix; license = licenses.mit; + + # prioritize iperf3 + priority = 10; }; }