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

26 lines
684 B
Nix
Raw Normal View History

{ stdenv, fetchurl, libpcap, enableStatic ? false }:
stdenv.mkDerivation rec {
2014-10-08 19:29:49 +02:00
name = "tcpdump-4.6.2";
src = fetchurl {
url = "http://www.tcpdump.org/release/${name}.tar.gz";
2014-10-08 19:29:49 +02:00
sha256 = "1f701387jyxq7rjhv4hiig3b3g55m4b4403rd0zncv1sx3cf8kjj";
};
buildInputs = [ libpcap ];
crossAttrs = {
LDFLAGS = if enableStatic then "-static" else "";
configureFlags = [ "ac_cv_linux_vers=2" ] ++ (stdenv.lib.optional
(stdenv.cross.platform.kernelMajor == "2.4") "--disable-ipv6");
};
meta = {
description = "Network sniffer";
homepage = http://www.tcpdump.org/;
license = "BSD-style";
maintainers = [ stdenv.lib.maintainers.mornfall ];
};
}