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

25 lines
684 B
Nix

{ stdenv, fetchurl, libpcap, enableStatic ? false }:
stdenv.mkDerivation rec {
name = "tcpdump-4.5.1";
src = fetchurl {
url = "http://www.tcpdump.org/release/${name}.tar.gz";
sha256 = "15hb7zkzd66nag102qbv100hcnf7frglbkylmr8adwr8f5jkkaql";
};
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 ];
};
}