1 { lib, stdenv, fetchurl, libpcap, pkg-config, perl }:
3 stdenv.mkDerivation rec {
8 url = "https://www.tcpdump.org/release/tcpdump-${version}.tar.gz";
9 hash = "sha256-jHWFbgCt3urfcNrWfJ/z3TaFNrK4Vjq/aFTXx2TNOts=";
16 nativeBuildInputs = lib.optional (stdenv.hostPlatform.isStatic) [ pkg-config ];
18 nativeCheckInputs = [ perl ];
20 buildInputs = [ libpcap ];
22 configureFlags = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "ac_cv_linux_vers=2";
25 description = "Network sniffer";
26 homepage = "https://www.tcpdump.org/";
27 license = licenses.bsd3;
28 maintainers = with maintainers; [ globin ];
29 platforms = platforms.unix;
30 mainProgram = "tcpdump";