11 inherit (stdenv.hostPlatform) isStatic;
13 src-cmake = fetchFromGitHub {
16 rev = "1be78cc8a889d95db047f473a0f48e0baee49f33";
17 hash = "sha256-zcXWP8CHx0RSDGpRTrYD99lHlqSbvaliXrtFowPfhBk=";
19 src-3rdparty = fetchFromGitHub {
21 repo = "zeek-3rdparty";
22 rev = "eb87829547270eab13c223e6de58b25bc9a0282e";
23 hash = "sha256-AVaKcRjF5ZiSR8aPSLBzSTeWVwGWW/aSyQJcN0Yhza0=";
25 caf' = caf.overrideAttrs (old: {
26 version = "unstable-2024-01-07-zeek";
27 src = fetchFromGitHub {
29 repo = "actor-framework";
30 rev = "e3048cdd13e085c97870a55eb1f9de04e25320f3";
31 hash = "sha256-uisoYXiZbFQa/TfWGRrCJ23MX4bg8Ds86ffC8sZSRNQ=";
33 cmakeFlags = old.cmakeFlags ++ [
34 "-DCAF_ENABLE_TESTING=OFF"
39 stdenv.mkDerivation rec {
40 pname = "zeek-broker";
49 src = fetchFromGitHub {
53 hash = "sha256-SG5TzozKvYc7qcEPJgiEtsxgzdZbbJt90lmuUbCPyv0=";
56 rmdir $sourceRoot/cmake $sourceRoot/3rdparty
57 ln -s ${src-cmake} ''${sourceRoot}/cmake
58 ln -s ${src-3rdparty} ''${sourceRoot}/3rdparty
60 # Refuses to build the bindings unless this file is present, but never
62 touch $sourceRoot/bindings/python/3rdparty/pybind11/CMakeLists.txt
66 ./0001-Fix-include-path-in-exported-CMake-targets.patch
69 postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
70 substituteInPlace bindings/python/CMakeLists.txt --replace " -u -r" ""
81 propagatedBuildInputs = [ caf' ];
85 "-DENABLE_STATIC_ONLY:BOOL=${if isStatic then "ON" else "OFF"}"
86 "-DPY_MOD_INSTALL_DIR=${placeholder "py"}/${python3.sitePackages}/"
90 description = "Zeek's Messaging Library";
91 mainProgram = "broker-benchmark";
92 homepage = "https://github.com/zeek/broker";
93 license = licenses.bsd3;
94 platforms = platforms.unix;
95 maintainers = with maintainers; [ tobim ];