1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-15 17:25:11 +00:00
nixpkgs/pkgs/tools/networking/tcpdump/default.nix

31 lines
864 B
Nix
Raw Normal View History

2017-06-28 21:47:36 +01:00
{ stdenv, fetchurl, libpcap, enableStatic ? false
, hostPlatform
}:
stdenv.mkDerivation rec {
name = "tcpdump-${version}";
version = "4.9.0";
src = fetchurl {
#url = "http://www.tcpdump.org/release/${name}.tar.gz";
url = "mirror://debian/pool/main/t/tcpdump/tcpdump_${version}.orig.tar.gz";
sha256 = "0pjsxsy8l71i813sa934cwf1ryp9xbr7nxwsvnzavjdirchq3sga";
};
buildInputs = [ libpcap ];
crossAttrs = {
LDFLAGS = if enableStatic then "-static" else "";
configureFlags = [ "ac_cv_linux_vers=2" ] ++ (stdenv.lib.optional
2017-06-28 21:47:36 +01:00
(hostPlatform.platform.kernelMajor == "2.4") "--disable-ipv6");
};
meta = {
description = "Network sniffer";
homepage = http://www.tcpdump.org/;
license = "BSD-style";
2015-06-22 07:25:07 +01:00
maintainers = with stdenv.lib.maintainers; [ mornfall jgeerds ];
platforms = stdenv.lib.platforms.linux;
};
}