From 57625514f4da97b1682abcc9883be319cc352293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sat, 28 Jan 2017 20:40:21 +0100 Subject: [PATCH] Adding nuttcp. --- pkgs/tools/networking/nuttcp/default.nix | 51 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/tools/networking/nuttcp/default.nix diff --git a/pkgs/tools/networking/nuttcp/default.nix b/pkgs/tools/networking/nuttcp/default.nix new file mode 100644 index 000000000000..70f3d7e9c70a --- /dev/null +++ b/pkgs/tools/networking/nuttcp/default.nix @@ -0,0 +1,51 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + name = "nuttcp-${version}"; + version = "8.1.4"; + + src = fetchurl { + urls = [ + "http://nuttcp.net/nuttcp/latest/${name}.c" + "http://nuttcp.net/nuttcp/${name}/${name}.c" + "http://nuttcp.net/nuttcp/beta/${name}.c" + ]; + sha256 = "1mygfhwxfi6xg0iycivx98ckak2abc3vwndq74278kpd8g0yyqyh"; + }; + + man = fetchurl { + url = "http://nuttcp.net/nuttcp/${name}/nuttcp.8"; + sha256 = "1yang94mcdqg362qbi85b63746hk6gczxrk619hyj91v5763n4vx"; + }; + + unpackPhase = ":"; + + buildPhase = '' + gcc -O2 -o nuttcp $src + ''; + + installPhase = '' + mkdir -p $out/bin + cp nuttcp $out/bin + ''; + + meta = with stdenv.lib; { + description = "Network performance measurement tool"; + longDescription = '' + nuttcp is a network performance measurement tool intended for use by + network and system managers. Its most basic usage is to determine the raw + TCP (or UDP) network layer throughput by transferring memory buffers from + a source system across an interconnecting network to a destination + system, either transferring data for a specified time interval, or + alternatively transferring a specified number of bytes. In addition to + reporting the achieved network throughput in Mbps, nuttcp also provides + additional useful information related to the data transfer such as user, + system, and wall-clock time, transmitter and receiver CPU utilization, + and loss percentage (for UDP transfers). + ''; + license = licenses.gpl2; + homepage = http://nuttcp.net/; + maintainers = with maintainers; [ viric ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f3d786bac286..e5576e0f82eb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3080,6 +3080,8 @@ with pkgs; numlockx = callPackage ../tools/X11/numlockx { }; + nuttcp = callPackage ../tools/networking/nuttcp { }; + nssmdns = callPackage ../tools/networking/nss-mdns { }; nwdiag = pythonPackages.nwdiag;