nixpkgs/pkgs/tools/misc/fluent-bit/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.5 KiB
Nix
Raw Normal View History

2023-07-29 13:00:09 +02:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
, flex
, bison
, systemd
, postgresql
, openssl
, libyaml
}:
stdenv.mkDerivation (finalAttrs: {
2019-05-03 20:46:53 +02:00
pname = "fluent-bit";
2023-11-10 18:38:31 +01:00
version = "2.2.0";
2019-05-03 20:46:53 +02:00
src = fetchFromGitHub {
owner = "fluent";
repo = "fluent-bit";
2023-07-29 13:00:09 +02:00
rev = "v${finalAttrs.version}";
2023-11-10 18:38:31 +01:00
hash = "sha256-E3fNU6aHyKMli+A+yiJUY065jchWkkAbumkdY8BaAAE=";
2019-05-03 20:46:53 +02:00
};
2019-10-29 10:20:00 +01:00
nativeBuildInputs = [ cmake flex bison ];
2019-05-03 20:46:53 +02:00
2022-11-07 23:01:46 +01:00
buildInputs = [ openssl libyaml postgresql ]
++ lib.optionals stdenv.isLinux [ systemd ];
2023-10-12 13:45:20 +02:00
cmakeFlags = [
"-DFLB_RELEASE=ON"
"-DFLB_METRICS=ON"
"-DFLB_HTTP_SERVER=ON"
"-DFLB_OUT_PGSQL=ON"
];
env.NIX_CFLAGS_COMPILE = toString (
# Used by the embedded luajit, but is not predefined on older mac SDKs.
lib.optionals stdenv.isDarwin [ "-DTARGET_OS_IPHONE=0" ]
# Assumes GNU version of strerror_r, and the posix version has an
# incompatible return type.
++ lib.optionals (!stdenv.hostPlatform.isGnu) [ "-Wno-int-conversion" ]
);
2020-11-03 00:52:05 +01:00
outputs = [ "out" "dev" ];
2019-05-03 20:46:53 +02:00
postPatch = ''
substituteInPlace src/CMakeLists.txt \
--replace /lib/systemd $out/lib/systemd
'';
2023-07-29 13:00:09 +02:00
meta = {
changelog = "https://github.com/fluent/fluent-bit/releases/tag/v${finalAttrs.version}";
2019-05-03 20:46:53 +02:00
description = "Log forwarder and processor, part of Fluentd ecosystem";
homepage = "https://fluentbit.io";
2023-07-29 13:00:09 +02:00
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.samrose lib.maintainers.fpletz ];
2023-10-12 13:45:20 +02:00
platforms = lib.platforms.unix;
2019-05-03 20:46:53 +02:00
};
2023-07-29 13:00:09 +02:00
})