2021-01-15 09:19:50 +00:00
|
|
|
{ lib, stdenv, fetchurl, libpcap, perl, fetchpatch }:
|
2007-01-16 14:35:08 +00:00
|
|
|
|
2019-10-02 12:26:57 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "tcpdump";
|
2019-10-02 12:26:57 +00:00
|
|
|
version = "4.9.3";
|
2008-09-01 13:00:24 +00:00
|
|
|
|
2017-09-06 12:53:09 +00:00
|
|
|
src = fetchurl {
|
2019-10-02 12:26:57 +00:00
|
|
|
url = "http://www.tcpdump.org/release/${pname}-${version}.tar.gz";
|
|
|
|
sha256 = "0434vdcnbqaia672rggjzdn4bb8p8dchz559yiszzdk0sjrprm1c";
|
2007-01-16 14:35:08 +00:00
|
|
|
};
|
2017-09-05 11:07:11 +00:00
|
|
|
|
2021-01-05 18:39:28 +00:00
|
|
|
patches = [
|
|
|
|
# Patch for CVE-2020-8037
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/the-tcpdump-group/tcpdump/commit/32027e199368dad9508965aae8cd8de5b6ab5231.patch";
|
|
|
|
sha256 = "sha256-bO3aV032ru9+M/9isBRjmH8jTZLKj9Zf9ha2rmOaZwc=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-08-08 21:38:52 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs tests
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [ perl ];
|
|
|
|
|
2010-02-05 22:00:51 +00:00
|
|
|
buildInputs = [ libpcap ];
|
2008-09-01 13:00:24 +00:00
|
|
|
|
2021-01-15 09:19:50 +00:00
|
|
|
configureFlags = lib.optional
|
2018-05-10 18:17:24 +00:00
|
|
|
(stdenv.hostPlatform != stdenv.buildPlatform)
|
|
|
|
"ac_cv_linux_vers=2";
|
2010-03-10 22:22:43 +00:00
|
|
|
|
2008-09-01 13:00:24 +00:00
|
|
|
meta = {
|
2014-08-24 14:21:08 +00:00
|
|
|
description = "Network sniffer";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.tcpdump.org/";
|
2008-09-01 13:00:24 +00:00
|
|
|
license = "BSD-style";
|
2021-01-15 09:19:50 +00:00
|
|
|
maintainers = with lib.maintainers; [ globin ];
|
|
|
|
platforms = lib.platforms.unix;
|
2008-09-01 13:00:24 +00:00
|
|
|
};
|
2007-01-16 14:35:08 +00:00
|
|
|
}
|