24 broker = callPackage ./broker { };
25 python = python3.withPackages (p: [ p.gitpython p.semantic-version ]);
27 stdenv.mkDerivation rec {
32 url = "https://download.zeek.org/zeek-${version}.tar.gz";
33 hash = "sha256-ZOOlK9mfZVrfxvgFREgqcRcSs18EMpADD8Y4Ev391Bw=";
39 ./fix-installation.patch
61 ] ++ lib.optionals stdenv.hostPlatform.isLinux [
63 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
68 patchShebangs ./ci/collect-repo-info.py
69 patchShebangs ./auxil/spicy/scripts
73 "-DBroker_ROOT=${broker}"
74 "-DENABLE_PERFTOOLS=true"
75 "-DINSTALL_AUX_TOOLS=true"
76 "-DZEEK_ETC_INSTALL_DIR=/etc/zeek"
77 "-DZEEK_LOG_DIR=/var/log/zeek"
78 "-DZEEK_STATE_DIR=/var/lib/zeek"
79 "-DZEEK_SPOOL_DIR=/var/spool/zeek"
80 "-DDISABLE_JAVASCRIPT=ON"
81 ] ++ lib.optionals stdenv.hostPlatform.isLinux [
82 "-DLIBKQUEUE_ROOT_DIR=${libkqueue}"
85 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-faligned-allocation";
88 for file in $out/share/zeek/base/frameworks/notice/actions/pp-alarms.zeek $out/share/zeek/base/frameworks/notice/main.zeek; do
89 substituteInPlace $file \
90 --replace "/bin/rm" "${coreutils}/bin/rm" \
91 --replace "/bin/cat" "${coreutils}/bin/cat"
94 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
95 substituteInPlace $file --replace "/bin/rm" "${coreutils}/bin/rm"
104 description = "Network analysis framework much different from a typical IDS";
105 homepage = "https://www.zeek.org";
106 changelog = "https://github.com/zeek/zeek/blob/v${version}/CHANGES";
107 license = licenses.bsd3;
108 maintainers = with maintainers; [ pSub tobim ];
109 platforms = platforms.unix;