summary refs log tree commit diff
path: root/pkgs/tools/networking/netsniff-ng
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2015-01-15 21:03:32 +0100
committerTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2015-01-15 21:03:32 +0100
commit2f32d8f848320db6834fdec16975f0830ac12d39 (patch)
tree276f314422da819c73268e66e69ce349eb5c9176 /pkgs/tools/networking/netsniff-ng
parentf93ce4faf1d7660458dc73e50c4e5a1ae7d32e9b (diff)
downloadnixlib-2f32d8f848320db6834fdec16975f0830ac12d39.tar
nixlib-2f32d8f848320db6834fdec16975f0830ac12d39.tar.gz
nixlib-2f32d8f848320db6834fdec16975f0830ac12d39.tar.bz2
nixlib-2f32d8f848320db6834fdec16975f0830ac12d39.tar.lz
nixlib-2f32d8f848320db6834fdec16975f0830ac12d39.tar.xz
nixlib-2f32d8f848320db6834fdec16975f0830ac12d39.tar.zst
nixlib-2f32d8f848320db6834fdec16975f0830ac12d39.zip
Add netsniff-ng 0.5.9-rc4-40-g5107740: Linux networking toolkit
Diffstat (limited to 'pkgs/tools/networking/netsniff-ng')
-rw-r--r--pkgs/tools/networking/netsniff-ng/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/tools/networking/netsniff-ng/default.nix b/pkgs/tools/networking/netsniff-ng/default.nix
new file mode 100644
index 000000000000..0fa4e2db229b
--- /dev/null
+++ b/pkgs/tools/networking/netsniff-ng/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchFromGitHub, bison, flex, geoip, libnet, libnetfilter_conntrack, libnl
+, libpcap, liburcu, ncurses, perl, pkgconfig, which, zlib }:
+
+stdenv.mkDerivation rec {
+  version = "0.5.9-rc4-40-g5107740";
+  name = "netsniff-ng-${version}";
+
+  src = fetchFromGitHub rec { # Upstream recommends and supports git
+    repo = "netsniff-ng";
+    owner = repo;
+    rev = "5107740603d10feed6104afd75042970cb392843";
+    sha256 = "1z3b7pa5rhz37dhfb1riy1j9lg917bs4z7clqbxm1hzi1x2ln988";
+  };
+
+  # ./configure is not autoGNU but some home-brewn magic
+  preConfigure = "patchShebangs configure";
+  postConfigure = "substituteInPlace Makefile --replace ' tput ' ' true '";
+
+  # FIXME: missing nacl/libcli and a *working* libnetfilter_conntrack
+  # The following tools will be missing: curvetun flowtop mausezahn
+  buildInputs = [ bison flex geoip libnet libnl libnetfilter_conntrack
+    libpcap liburcu ncurses perl pkgconfig which zlib ];
+
+  enableParallelBuilding = true;
+
+  # Tries to install to /etc, but they're more like /share files anyway
+  makeFlags = "PREFIX=$(out) ETCDIR=$(out)/etc";
+
+  meta = with stdenv.lib; {
+    description = "Swiss army knife for daily Linux network plumbing";
+    longDescription = ''
+      netsniff-ng is a free Linux networking toolkit. Its gain of performance
+      is reached by zero-copy mechanisms, so that on packet reception and
+      transmission the kernel does not need to copy packets from kernel space
+      to user space and vice versa. The toolkit can be used for network
+      development and analysis, debugging, auditing or network reconnaissance.
+    '';
+    homepage = http://netsniff-ng.org/;
+    license = with licenses; gpl2;
+    platforms = with platforms; linux;
+    maintainers = with maintainers; [ nckx ];
+  };
+}