3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/ids/zeek/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

82 lines
1.8 KiB
Nix
Raw Normal View History

2021-02-26 01:13:36 +00:00
{ lib
, stdenv
2020-07-28 01:00:00 +01:00
, fetchurl
, cmake
, flex
, bison
, openssl
, libpcap
, zlib
, file
, curl
, libmaxminddb
, gperftools
, python3
2020-07-28 01:00:00 +01:00
, swig
, gettext
, coreutils
, ncurses
2021-03-05 11:00:00 +00:00
, caf
2020-07-28 01:00:00 +01:00
}:
2021-02-26 01:13:36 +00:00
2019-09-30 03:21:21 +01:00
stdenv.mkDerivation rec {
pname = "zeek";
2022-01-25 23:09:49 +00:00
version = "4.2.0";
2019-09-30 03:21:21 +01:00
src = fetchurl {
2020-04-18 10:20:00 +01:00
url = "https://download.zeek.org/zeek-${version}.tar.gz";
2022-01-25 23:09:49 +00:00
sha256 = "sha256-jZoCjKn+x61KnkinY+KWBSOEz0AupM03FXe/8YPCdFE=";
2019-09-30 03:21:21 +01:00
};
2022-01-25 23:09:49 +00:00
nativeBuildInputs = [
bison
cmake
file
flex
];
buildInputs = [
curl
gperftools
libmaxminddb
libpcap
ncurses
openssl
python3
swig
zlib
] ++ lib.optionals stdenv.isDarwin [
gettext
];
2019-09-30 03:21:21 +01:00
outputs = [ "out" "lib" "py" ];
2020-04-10 10:20:00 +01:00
2019-09-30 03:21:21 +01:00
cmakeFlags = [
2021-03-05 11:00:00 +00:00
"-DCAF_ROOT=${caf}"
"-DZEEK_PYTHON_DIR=${placeholder "py"}/lib/${python3.libPrefix}/site-packages"
2019-09-30 03:21:21 +01:00
"-DENABLE_PERFTOOLS=true"
"-DINSTALL_AUX_TOOLS=true"
];
2021-02-26 01:13:36 +00:00
postInstall = ''
for file in $out/share/zeek/base/frameworks/notice/actions/pp-alarms.zeek $out/share/zeek/base/frameworks/notice/main.zeek; do
substituteInPlace $file \
--replace "/bin/rm" "${coreutils}/bin/rm" \
--replace "/bin/cat" "${coreutils}/bin/cat"
done
for file in $out/share/zeek/policy/misc/trim-trace-file.zeek $out/share/zeek/base/frameworks/logging/postprocessors/scp.zeek $out/share/zeek/base/frameworks/logging/postprocessors/sftp.zeek; do
substituteInPlace $file --replace "/bin/rm" "${coreutils}/bin/rm"
done
'';
meta = with lib; {
2022-01-25 23:09:49 +00:00
description = "Network analysis framework much different from a typical IDS";
2019-09-30 03:21:21 +01:00
homepage = "https://www.zeek.org";
changelog = "https://github.com/zeek/zeek/blob/v${version}/CHANGES";
2019-09-30 03:21:21 +01:00
license = licenses.bsd3;
2019-10-02 10:00:00 +01:00
maintainers = with maintainers; [ pSub marsam tobim ];
2019-09-30 03:21:21 +01:00
platforms = platforms.unix;
};
}