lol
1{ lib, stdenv, fetchurl }:
2
3stdenv.mkDerivation rec {
4 pname = "nuttcp";
5 version = "8.1.4";
6
7 src = fetchurl {
8 urls = [
9 "http://nuttcp.net/nuttcp/latest/${pname}-${version}.c"
10 "http://nuttcp.net/nuttcp/${pname}-${version}/${pname}-${version}.c"
11 "http://nuttcp.net/nuttcp/beta/${pname}-${version}.c"
12 ];
13 sha256 = "1mygfhwxfi6xg0iycivx98ckak2abc3vwndq74278kpd8g0yyqyh";
14 };
15
16 man = fetchurl {
17 url = "http://nuttcp.net/nuttcp/${pname}-${version}/nuttcp.8";
18 sha256 = "1yang94mcdqg362qbi85b63746hk6gczxrk619hyj91v5763n4vx";
19 };
20
21 dontUnpack = true;
22
23 buildPhase = ''
24 cc -O2 -o nuttcp $src
25 '';
26
27 installPhase = ''
28 mkdir -p $out/bin
29 cp nuttcp $out/bin
30 '';
31
32 meta = with lib; {
33 description = "Network performance measurement tool";
34 longDescription = ''
35 nuttcp is a network performance measurement tool intended for use by
36 network and system managers. Its most basic usage is to determine the raw
37 TCP (or UDP) network layer throughput by transferring memory buffers from
38 a source system across an interconnecting network to a destination
39 system, either transferring data for a specified time interval, or
40 alternatively transferring a specified number of bytes. In addition to
41 reporting the achieved network throughput in Mbps, nuttcp also provides
42 additional useful information related to the data transfer such as user,
43 system, and wall-clock time, transmitter and receiver CPU utilization,
44 and loss percentage (for UDP transfers).
45 '';
46 license = licenses.gpl2;
47 homepage = "http://nuttcp.net/";
48 maintainers = with maintainers; [ ];
49 platforms = platforms.unix;
50 };
51}