15 stdenv.mkDerivation (finalAttrs: {
19 src = fetchFromGitHub {
22 rev = "v${finalAttrs.version}";
23 hash = "sha256-oTCGjDmGVovsfj+4fjIKy/xpiuYc0Q44LYwYPI4dSF8=";
26 # optional only to avoid linux rebuild
27 patches = lib.optionals stdenv.hostPlatform.isDarwin [ ./macos-11-sdk-compat.patch ];
41 ++ lib.optionals stdenv.hostPlatform.isLinux [ systemd ]
42 ++ lib.optionals stdenv.hostPlatform.isDarwin [
43 darwin.apple_sdk_11_0.frameworks.IOKit
44 darwin.apple_sdk_11_0.frameworks.Foundation
50 "-DFLB_HTTP_SERVER=ON"
54 env.NIX_CFLAGS_COMPILE = toString (
55 # Assumes GNU version of strerror_r, and the posix version has an
56 # incompatible return type.
57 lib.optionals (!stdenv.hostPlatform.isGnu) [ "-Wno-int-conversion" ]
66 substituteInPlace src/CMakeLists.txt \
67 --replace /lib/systemd $out/lib/systemd
71 changelog = "https://github.com/fluent/fluent-bit/releases/tag/v${finalAttrs.version}";
72 description = "Log forwarder and processor, part of Fluentd ecosystem";
73 homepage = "https://fluentbit.io";
74 license = lib.licenses.asl20;
75 maintainers = with lib.maintainers; [
79 platforms = lib.platforms.unix;