summary refs log tree commit diff
path: root/pkgs/tools/networking/jnettop/default.nix
blob: bd31235b6f943721e3a819d56e81506a9a7c49d3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ fetchurl, fetchpatch, lib, stdenv, autoconf, libpcap, ncurses, pkg-config, glib }:

stdenv.mkDerivation {
  name = "jnettop-0.13.0";

  src = fetchurl {
    url = "http://jnettop.kubs.info/dist/jnettop-0.13.0.tar.gz";
    sha256 = "1855np7c4b0bqzhf1l1dyzxb90fpnvrirdisajhci5am6als31z9";
  };

  nativeBuildInputs = [ pkg-config autoconf ];
  buildInputs = [ libpcap ncurses glib ];

  patches = [
    ./no-dns-resolution.patch
    (fetchpatch {
      url = "https://sources.debian.net/data/main/j/jnettop/0.13.0-1/debian/patches/0001-Use-64-bit-integers-for-byte-totals-support-bigger-u.patch";
      sha256 = "1b0alc12sj8pzcb66f8xslbqlbsvq28kz34v6jfhbb1q25hyr7jg";
    })
  ];

  preConfigure = "autoconf ";

  meta = {
    description = "Network traffic visualizer";

    longDescription = ''
      Jnettop is a traffic visualiser, which captures traffic going
      through the host it is running from and displays streams sorted
      by bandwidth they use.
    '';

    homepage = "http://jnettop.kubs.info/";
    license = lib.licenses.gpl2Plus;
    platforms = lib.platforms.unix;
  };
}