nixpkgs/pkgs/tools/networking/tcpdump/default.nix
2017-01-22 13:01:00 +01:00

27 lines
742 B
Nix

{ stdenv, fetchurl, libpcap, enableStatic ? false }:
stdenv.mkDerivation rec {
name = "tcpdump-4.8.1";
src = fetchurl {
url = "http://www.tcpdump.org/release/${name}.tar.gz";
sha256 = "0743ipl0l7ymjss3ybvvc5cbk9kb7s8yl4p3ramp5kwgqhg39r10";
};
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 = with stdenv.lib.maintainers; [ mornfall jgeerds ];
platforms = stdenv.lib.platforms.linux;
};
}