25 broker = callPackage ./broker { };
26 python = python3.withPackages (p: [
31 stdenv.mkDerivation rec {
36 url = "https://download.zeek.org/zeek-${version}.tar.gz";
37 hash = "sha256-ZOOlK9mfZVrfxvgFREgqcRcSs18EMpADD8Y4Ev391Bw=";
43 ./fix-installation.patch
67 ++ lib.optionals stdenv.hostPlatform.isLinux [
70 ++ lib.optionals stdenv.hostPlatform.isDarwin [
75 patchShebangs ./ci/collect-repo-info.py
76 patchShebangs ./auxil/spicy/scripts
81 "-DBroker_ROOT=${broker}"
82 "-DENABLE_PERFTOOLS=true"
83 "-DINSTALL_AUX_TOOLS=true"
84 "-DZEEK_ETC_INSTALL_DIR=/etc/zeek"
85 "-DZEEK_LOG_DIR=/var/log/zeek"
86 "-DZEEK_STATE_DIR=/var/lib/zeek"
87 "-DZEEK_SPOOL_DIR=/var/spool/zeek"
88 "-DDISABLE_JAVASCRIPT=ON"
90 ++ lib.optionals stdenv.hostPlatform.isLinux [
91 "-DLIBKQUEUE_ROOT_DIR=${libkqueue}"
95 for file in $out/share/zeek/base/frameworks/notice/actions/pp-alarms.zeek $out/share/zeek/base/frameworks/notice/main.zeek; do
96 substituteInPlace $file \
97 --replace "/bin/rm" "${coreutils}/bin/rm" \
98 --replace "/bin/cat" "${coreutils}/bin/cat"
101 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
102 substituteInPlace $file --replace "/bin/rm" "${coreutils}/bin/rm"
111 description = "Network analysis framework much different from a typical IDS";
112 homepage = "https://www.zeek.org";
113 changelog = "https://github.com/zeek/zeek/blob/v${version}/CHANGES";
114 license = licenses.bsd3;
115 maintainers = with maintainers; [
119 platforms = platforms.unix;