nixpkgs-suyu/pkgs/tools/networking/tcpdump/default.nix

32 lines
829 B
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, libpcap, enableStatic ? false
2017-06-28 22:47:36 +02:00
, hostPlatform
}:
stdenv.mkDerivation rec {
name = "tcpdump-${version}";
version = "4.9.1";
src = fetchFromGitHub rec {
owner = "the-tcpdump-group";
repo = "tcpdump";
rev = "${repo}-${version}";
sha256 = "1vzrvn1q7x28h18yskqc390y357pzpg5xd3pzzj4xz3llnvsr64p";
};
buildInputs = [ libpcap ];
crossAttrs = {
LDFLAGS = if enableStatic then "-static" else "";
configureFlags = [ "ac_cv_linux_vers=2" ] ++ (stdenv.lib.optional
2017-06-28 22:47:36 +02:00
(hostPlatform.platform.kernelMajor == "2.4") "--disable-ipv6");
};
meta = {
description = "Network sniffer";
homepage = http://www.tcpdump.org/;
license = "BSD-style";
2015-06-22 08:25:07 +02:00
maintainers = with stdenv.lib.maintainers; [ mornfall jgeerds ];
platforms = stdenv.lib.platforms.linux;
};
}