aboutsummaryrefslogtreecommitdiff
path: root/flakes/mypackages/pkgs/fluent-bit/default.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2023-10-04 01:35:06 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2023-10-04 02:11:48 +0200
commit1a64deeb894dc95e2645a75771732c6cc53a79ad (patch)
tree1b9df4838f894577a09b9b260151756272efeb53 /flakes/mypackages/pkgs/fluent-bit/default.nix
parentfa25ffd4583cc362075cd5e1b4130f33306103f0 (diff)
downloadNix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.gz
Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.zst
Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.zip
Squash changes containing private information
There were a lot of changes since the previous commit, but a lot of them contained personnal information about users. All thos changes got stashed into a single commit (history is kept in a different place) and private information was moved in a separate private repository
Diffstat (limited to 'flakes/mypackages/pkgs/fluent-bit/default.nix')
-rw-r--r--flakes/mypackages/pkgs/fluent-bit/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/flakes/mypackages/pkgs/fluent-bit/default.nix b/flakes/mypackages/pkgs/fluent-bit/default.nix
new file mode 100644
index 0000000..390223e
--- /dev/null
+++ b/flakes/mypackages/pkgs/fluent-bit/default.nix
@@ -0,0 +1,47 @@
1{ lib, stdenv, fetchFromGitHub, cmake, flex, bison, pkg-config
2, systemd, openssl, postgresql }:
3
4stdenv.mkDerivation rec {
5 pname = "fluent-bit";
6 version = "1.8.3";
7
8 src = fetchFromGitHub {
9 owner = "fluent";
10 repo = "fluent-bit";
11 rev = "v${version}";
12 sha256 = "004x135imja67babmmpkk1jpp5xwhfa8cwg1svaas2asq6cnv77d";
13 };
14
15 nativeBuildInputs = [ cmake flex bison pkg-config postgresql ];
16
17 buildInputs = [ openssl ]
18 ++ lib.optionals stdenv.isLinux [ systemd ];
19
20 cmakeFlags = [ "-DFLB_METRICS=ON" "-DFLB_HTTP_SERVER=ON" "-DFLB_SQLDB=ON" "-DFLB_OUT_PGSQL=ON" "-DFLB_IN_SYSTEMD=ON" ];
21
22 patches = lib.optionals stdenv.isDarwin [ ./fix-luajit-darwin.patch ];
23
24 NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [
25 # _FORTIFY_SOURCE requires compiling with optimization (-O)
26 "-O"
27 # Needed due to bundled mbedtls
28 "-Wno-error=format"
29 "-Wno-error=format-truncation"
30 ];
31
32
33 outputs = [ "out" "dev" ];
34
35 postPatch = ''
36 substituteInPlace src/CMakeLists.txt \
37 --replace /lib/systemd $out/lib/systemd
38 '';
39
40 meta = with lib; {
41 description = "Log forwarder and processor, part of Fluentd ecosystem";
42 homepage = "https://fluentbit.io";
43 maintainers = with maintainers; [ samrose fpletz ];
44 license = licenses.asl20;
45 platforms = platforms.unix;
46 };
47}