2015-03-06 16:41:59 +00:00
|
|
|
{ stdenv, fetchFromGitHub, bison, flex, libcli, libnet
|
2015-01-17 15:46:23 +00:00
|
|
|
, libnetfilter_conntrack, libnl, libpcap, libsodium, liburcu, ncurses, perl
|
2015-03-06 16:41:59 +00:00
|
|
|
, pkgconfig, zlib }:
|
2015-01-15 20:03:32 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-03-30 20:04:30 +01:00
|
|
|
version = "v0.5.9-rc4-53-gdd5d906";
|
2015-01-15 20:03:32 +00:00
|
|
|
name = "netsniff-ng-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub rec { # Upstream recommends and supports git
|
|
|
|
repo = "netsniff-ng";
|
|
|
|
owner = repo;
|
2015-03-30 20:04:30 +01:00
|
|
|
rev = "dd5d906c40db5264d8d33c37565b39540f0258c8";
|
|
|
|
sha256 = "0iwnfjbxiv10zk5mfpnvs2xb88f14hv1a156kn9mhasszknp0a57";
|
2015-01-15 20:03:32 +00:00
|
|
|
};
|
|
|
|
|
2015-03-06 16:41:59 +00:00
|
|
|
buildInputs = [ bison flex libcli libnet libnl libnetfilter_conntrack
|
|
|
|
libpcap libsodium liburcu ncurses perl pkgconfig zlib ];
|
2015-01-17 15:46:23 +00:00
|
|
|
|
|
|
|
# ./configure is not autoGNU but some home-brewn magic
|
|
|
|
configurePhase = ''
|
|
|
|
patchShebangs configure
|
2015-03-06 16:41:59 +00:00
|
|
|
substituteInPlace configure --replace "which" "command -v"
|
2015-01-17 15:46:23 +00:00
|
|
|
NACL_INC_DIR=${libsodium}/include/sodium NACL_LIB=sodium ./configure
|
|
|
|
'';
|
2015-01-15 20:03:32 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|