2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv
|
2020-07-28 02:00:00 +02:00
|
|
|
, fetchurl
|
|
|
|
, cmake
|
|
|
|
, flex
|
|
|
|
, bison
|
|
|
|
, openssl
|
|
|
|
, libpcap
|
|
|
|
, zlib
|
|
|
|
, file
|
|
|
|
, curl
|
|
|
|
, libmaxminddb
|
|
|
|
, gperftools
|
|
|
|
, python
|
|
|
|
, swig
|
|
|
|
, gettext
|
|
|
|
, fetchpatch
|
2020-09-12 00:59:31 +02:00
|
|
|
, coreutils
|
2020-07-28 02:00:00 +02:00
|
|
|
}:
|
2020-03-02 01:48:23 +01:00
|
|
|
let
|
2020-09-12 00:59:31 +02:00
|
|
|
preConfigure = (import ./script.nix {inherit coreutils;});
|
2020-03-02 01:48:23 +01:00
|
|
|
in
|
2019-09-30 04:21:21 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "zeek";
|
2020-12-20 05:20:00 +01:00
|
|
|
version = "3.2.3";
|
2019-09-30 04:21:21 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-04-18 11:20:00 +02:00
|
|
|
url = "https://download.zeek.org/zeek-${version}.tar.gz";
|
2020-12-20 05:20:00 +01:00
|
|
|
sha256 = "1in25clpbb2vdhms3iypj6r5sp8d1dxjcfn85c272sh7shnmqagr";
|
2019-09-30 04:21:21 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake flex bison file ];
|
2020-07-28 02:00:00 +02:00
|
|
|
buildInputs = [ openssl libpcap zlib curl libmaxminddb gperftools python swig ]
|
2021-01-15 06:42:41 +01:00
|
|
|
++ lib.optionals stdenv.isDarwin [ gettext ];
|
2019-09-30 04:21:21 +02:00
|
|
|
|
2020-03-02 01:48:23 +01:00
|
|
|
#see issue https://github.com/zeek/zeek/issues/804 to modify hardlinking duplicate files.
|
|
|
|
inherit preConfigure;
|
2020-04-10 11:20:00 +02:00
|
|
|
|
2021-01-15 06:42:41 +01:00
|
|
|
patches = lib.optionals stdenv.cc.isClang [
|
2020-04-10 11:20:00 +02:00
|
|
|
# Fix pybind c++17 build with Clang. See: https://github.com/pybind/pybind11/issues/1604
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/pybind/pybind11/commit/759221f5c56939f59d8f342a41f8e2d2cacbc8cf.patch";
|
2020-08-10 11:20:00 +02:00
|
|
|
sha256 = "17qznp8yavnv84fjsbghv3d59z6k6rx74j49w0izakmgw5a95w84";
|
|
|
|
extraPrefix = "auxil/broker/bindings/python/3rdparty/pybind11/";
|
2020-04-10 11:20:00 +02:00
|
|
|
stripLen = 1;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2019-09-30 04:21:21 +02:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DPY_MOD_INSTALL_DIR=${placeholder "out"}/${python.sitePackages}"
|
|
|
|
"-DENABLE_PERFTOOLS=true"
|
|
|
|
"-DINSTALL_AUX_TOOLS=true"
|
|
|
|
];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-09-30 04:21:21 +02:00
|
|
|
description = "Powerful network analysis framework much different from a typical IDS";
|
|
|
|
homepage = "https://www.zeek.org";
|
2020-12-20 05:20:00 +01:00
|
|
|
changelog = "https://github.com/zeek/zeek/blob/v${version}/CHANGES";
|
2019-09-30 04:21:21 +02:00
|
|
|
license = licenses.bsd3;
|
2019-10-02 11:00:00 +02:00
|
|
|
maintainers = with maintainers; [ pSub marsam tobim ];
|
2019-09-30 04:21:21 +02:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|