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