diff --git a/pkgs/tools/networking/jnettop/default.nix b/pkgs/tools/networking/jnettop/default.nix new file mode 100644 index 000000000000..132d1832a9d5 --- /dev/null +++ b/pkgs/tools/networking/jnettop/default.nix @@ -0,0 +1,28 @@ +{ fetchurl, stdenv, autoconf, libpcap, ncurses, pkgconfig, glib }: + +stdenv.mkDerivation rec { + name = "jnettop-0.13.0"; + + src = fetchurl { + url = "http://jnettop.kubs.info/dist/jnettop-0.13.0.tar.gz"; + sha256 = "1855np7c4b0bqzhf1l1dyzxb90fpnvrirdisajhci5am6als31z9"; + }; + + buildInputs = [ autoconf libpcap ncurses pkgconfig glib ]; + + patches = [ ./no-dns-resolution.patch ]; + preConfigure = '' autoconf ''; + + meta = { + description = "Jnettop, a 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 = "GPLv2+"; + }; +} diff --git a/pkgs/tools/networking/jnettop/no-dns-resolution.patch b/pkgs/tools/networking/jnettop/no-dns-resolution.patch new file mode 100644 index 000000000000..65928a373009 --- /dev/null +++ b/pkgs/tools/networking/jnettop/no-dns-resolution.patch @@ -0,0 +1,13 @@ +When built in a chroot, `configure' fails to resolve `localhost'. +Furthermore that test appears to be useless. + +--- jnettop-0.13.0/configure.ac 2006-04-29 15:34:09.000000000 +0200 ++++ jnettop-0.13.0/configure.ac 2008-12-03 15:11:28.000000000 +0100 +@@ -63,7 +63,6 @@ AC_NETTOP_CHECK_IN6_ADDR + + LDFLAGS="$LDFLAGS $NSL_LIBS $SOCKET_LIBS" + +-AC_NETTOP_CHECK_WORKING_RESOLVER + AC_NETTOP_CHECK_GETHOSTBYADDR_R + + AM_PATH_GLIB_2_0(2.0.1,, AC_MSG_ERROR("glib >= 2.0.1 library required"), gthread) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4bdb5b0acb52..c8a1cf4b5ab6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -918,6 +918,11 @@ let inherit fetchurl stdenv unzip jre; }; + jnettop = import ../tools/networking/jnettop { + inherit fetchurl stdenv autoconf libpcap ncurses pkgconfig; + inherit (gnome) glib; + }; + jwhois = import ../tools/networking/jwhois { inherit fetchurl stdenv; };