summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2021-06-29 15:03:48 +0200
committerFranz Pletz <fpletz@fnordicwalking.de>2021-07-06 16:48:58 +0200
commitf4e3ccdbb2ccf1a51a677e77e84a2d2720f3c50d (patch)
tree3a7eff8f9f000dabab7a6b59e4833e4bae2fa5f0
parenteea558539e26ac8dfa62a276194650d08eb74c2a (diff)
downloadnixpkgs-f4e3ccdbb2ccf1a51a677e77e84a2d2720f3c50d.tar
nixpkgs-f4e3ccdbb2ccf1a51a677e77e84a2d2720f3c50d.tar.gz
nixpkgs-f4e3ccdbb2ccf1a51a677e77e84a2d2720f3c50d.tar.bz2
nixpkgs-f4e3ccdbb2ccf1a51a677e77e84a2d2720f3c50d.tar.lz
nixpkgs-f4e3ccdbb2ccf1a51a677e77e84a2d2720f3c50d.tar.xz
nixpkgs-f4e3ccdbb2ccf1a51a677e77e84a2d2720f3c50d.tar.zst
nixpkgs-f4e3ccdbb2ccf1a51a677e77e84a2d2720f3c50d.zip
fluent-bit: enable metrics & systemd support
-rw-r--r--pkgs/tools/misc/fluent-bit/default.nix12
1 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/tools/misc/fluent-bit/default.nix b/pkgs/tools/misc/fluent-bit/default.nix
index 5a5ad121b39..fe7599ac815 100644
--- a/pkgs/tools/misc/fluent-bit/default.nix
+++ b/pkgs/tools/misc/fluent-bit/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, cmake, flex, bison }:
+{ lib, stdenv, fetchFromGitHub, cmake, flex, bison, systemd }:
 
 stdenv.mkDerivation rec {
   pname = "fluent-bit";
@@ -13,11 +13,17 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ cmake flex bison ];
 
+  buildInputs = lib.optionals stdenv.isLinux [ systemd ];
+
+  cmakeFlags = [ "-DFLB_METRICS=ON" "-DFLB_HTTP_SERVER=ON" ];
+
   patches = lib.optionals stdenv.isDarwin [ ./fix-luajit-darwin.patch ];
 
   # _FORTIFY_SOURCE requires compiling with optimization (-O)
   NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-O";
 
+  outputs = [ "out" "dev" ];
+
   postPatch = ''
     substituteInPlace src/CMakeLists.txt \
       --replace /lib/systemd $out/lib/systemd
@@ -26,9 +32,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     description = "Log forwarder and processor, part of Fluentd ecosystem";
     homepage = "https://fluentbit.io";
-    maintainers = with maintainers; [
-      samrose
-    ];
+    maintainers = with maintainers; [ samrose fpletz ];
     license = licenses.asl20;
     platforms = platforms.unix;
   };