11 stdenv.mkDerivation rec {
16 url = "http://ex-parrot.com/pdw/iftop/download/iftop-${version}.tar.gz";
17 sha256 = "15sgkdyijb7vbxpxjavh5qm5nvyii3fqcg9mzvw7fx8s6zmfwczp";
20 # Explicitly link against libgcc_s, to work around the infamous
21 # "libgcc_s.so.1 must be installed for pthread_cancel to work".
22 LDFLAGS = lib.optionalString stdenv.hostPlatform.isLinux "-lgcc_s";
25 cp ${automake}/share/automake*/config.{sub,guess} config
33 # Workaround build failure on -fno-common toolchains like upstream
34 # gcc-10. Otherwise build fails as:
35 # ld: tui.o:/build/iftop-1.0pre4/ui_common.h:41: multiple definition of `service_hash';
36 # iftop.o:/build/iftop-1.0pre4/ui_common.h:41: first defined here
37 env.NIX_CFLAGS_COMPILE = "-fcommon";
39 passthru.tests = { inherit (nixosTests) iftop; };
42 description = "Display bandwidth usage on a network interface";
44 iftop does for network usage what top(1) does for CPU usage. It listens
45 to network traffic on a named interface and displays a table of current
46 bandwidth usage by pairs of hosts.
48 license = licenses.gpl2Plus;
49 homepage = "http://ex-parrot.com/pdw/iftop/";
50 platforms = platforms.unix;
52 mainProgram = "iftop";