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 13:26:57 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "tcpdump";
|
2019-10-02 13:26:57 +01:00
|
|
|
version = "4.9.3";
|
2008-09-01 14:00:24 +01:00
|
|
|
|
2017-09-06 13:53:09 +01:00
|
|
|
src = fetchurl {
|
2019-10-02 13:26:57 +01:00
|
|
|
url = "http://www.tcpdump.org/release/${pname}-${version}.tar.gz";
|
|
|
|
sha256 = "0434vdcnbqaia672rggjzdn4bb8p8dchz559yiszzdk0sjrprm1c";
|
2007-01-16 14:35:08 +00:00
|
|
|
};
|
2017-09-05 12:07:11 +01: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 22:38:52 +01:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs tests
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [ perl ];
|
|
|
|
|
2010-02-05 22:00:51 +00:00
|
|
|
buildInputs = [ libpcap ];
|
2008-09-01 14:00:24 +01:00
|
|
|
|
2021-01-15 09:19:50 +00:00
|
|
|
configureFlags = lib.optional
|
2018-05-10 19:17:24 +01:00
|
|
|
(stdenv.hostPlatform != stdenv.buildPlatform)
|
|
|
|
"ac_cv_linux_vers=2";
|
2010-03-10 22:22:43 +00:00
|
|
|
|
2008-09-01 14:00:24 +01:00
|
|
|
meta = {
|
2014-08-24 15:21:08 +01:00
|
|
|
description = "Network sniffer";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.tcpdump.org/";
|
2008-09-01 14:00:24 +01:00
|
|
|
license = "BSD-style";
|
2021-01-15 09:19:50 +00:00
|
|
|
maintainers = with lib.maintainers; [ globin ];
|
|
|
|
platforms = lib.platforms.unix;
|
2008-09-01 14:00:24 +01:00
|
|
|
};
|
2007-01-16 14:35:08 +00:00
|
|
|
}
|