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 11:00:09 +00:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
, flex
, bison
, systemd
, postgresql
, openssl
, libyaml
}:
stdenv.mkDerivation (finalAttrs: {
2019-05-03 18:46:53 +00:00
pname = "fluent-bit";
2023-10-05 00:17:59 +00:00
version = "2.1.10";
2019-05-03 18:46:53 +00:00
src = fetchFromGitHub {
owner = "fluent";
repo = "fluent-bit";
2023-07-29 11:00:09 +00:00
rev = "v${finalAttrs.version}";
2023-10-05 00:17:59 +00:00
hash = "sha256-6uq5eOHx0P2S3WsN0PooNlGQS2ty7DdPsCEgoQsLmRM=";
2019-05-03 18:46:53 +00:00
};
2019-10-29 09:20:00 +00:00
nativeBuildInputs = [ cmake flex bison ];
2019-05-03 18:46:53 +00:00
2022-11-07 22:01:46 +00:00
buildInputs = [ openssl libyaml postgresql ]
++ lib.optionals stdenv.isLinux [ systemd ];
2023-10-12 11:45:20 +00: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-02 23:52:05 +00:00
outputs = [ "out" "dev" ];
2019-05-03 18:46:53 +00:00
postPatch = ''
substituteInPlace src/CMakeLists.txt \
--replace /lib/systemd $out/lib/systemd
'';
2023-07-29 11:00:09 +00:00
meta = {
changelog = "https://github.com/fluent/fluent-bit/releases/tag/v${finalAttrs.version}";
2019-05-03 18:46:53 +00:00
description = "Log forwarder and processor, part of Fluentd ecosystem";
homepage = "https://fluentbit.io";
2023-07-29 11:00:09 +00:00
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.samrose lib.maintainers.fpletz ];
2023-10-12 11:45:20 +00:00
platforms = lib.platforms.unix;
2019-05-03 18:46:53 +00:00
};
2023-07-29 11:00:09 +00:00
})