nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 installShellFiles,
6}:
7
8stdenv.mkDerivation (finalAttrs: {
9 pname = "nuttcp";
10 version = "8.2.2";
11
12 src = fetchurl {
13 url = "http://nuttcp.net/nuttcp/nuttcp-${finalAttrs.version}.tar.bz2";
14 sha256 = "sha256-fq16ieeqoFnSDjQELFihmMKYHK1ylVDROI3fyQNtOYM=";
15 };
16
17 nativeBuildInputs = [
18 installShellFiles
19 ];
20
21 makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
22
23 installPhase = ''
24 mkdir -p $out/bin
25 cp nuttcp-${finalAttrs.version} $out/bin/nuttcp
26 '';
27
28 postInstall = ''
29 installManPage nuttcp.8
30 '';
31
32 meta = {
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 = lib.licenses.gpl2Only;
47 homepage = "http://nuttcp.net/";
48 maintainers = [ ];
49 platforms = lib.platforms.unix;
50 mainProgram = "nuttcp";
51 };
52})