Unverified Commit fd670a90 authored by Franz Pletz's avatar Franz Pletz Committed by GitHub
Browse files

Merge pull request #328934 from r-ryantm/auto-update/fluent-bit

parents a699a0fb 436548a5
Loading
Loading
Loading
Loading
+38 −20
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, cmake
, flex
, bison
, systemd
, postgresql
, openssl
, libyaml
, darwin
{
  lib,
  stdenv,
  fetchFromGitHub,
  cmake,
  flex,
  bison,
  systemd,
  postgresql,
  openssl,
  libyaml,
  darwin,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "fluent-bit";
  version = "3.1.0";
  version = "3.1.3";

  src = fetchFromGitHub {
    owner = "fluent";
    repo = "fluent-bit";
    rev = "v${finalAttrs.version}";
    hash = "sha256-X97Z/1GBooQNH6SLH5AG6uX7BkCXCIkdh9vEE4IkUEA=";
    hash = "sha256-bRgRpCnMt20JEuKqW5VetW8HyMgjNuqEgoeBG7sm++Y=";
  };

  # optional only to avoid linux rebuild
  patches = lib.optionals stdenv.isDarwin [ ./macos-11-sdk-compat.patch ];

  nativeBuildInputs = [ cmake flex bison ];
  nativeBuildInputs = [
    cmake
    flex
    bison
  ];

  buildInputs = [ openssl libyaml postgresql ]
  buildInputs =
    [
      openssl
      libyaml
      postgresql
    ]
    ++ lib.optionals stdenv.isLinux [ systemd ]
    ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk_11_0.frameworks.IOKit darwin.apple_sdk_11_0.frameworks.Foundation ];
    ++ lib.optionals stdenv.isDarwin [
      darwin.apple_sdk_11_0.frameworks.IOKit
      darwin.apple_sdk_11_0.frameworks.Foundation
    ];

  cmakeFlags = [
    "-DFLB_RELEASE=ON"
    "-DFLB_METRICS=ON"
    "-DFLB_HTTP_SERVER=ON"
    "-DFLB_OUT_PGSQL=ON"
  ]
  ++ lib.optionals stdenv.isDarwin [ "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13" ];
  ] ++ lib.optionals stdenv.isDarwin [ "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13" ];

  env.NIX_CFLAGS_COMPILE = toString (
    # Used by the embedded luajit, but is not predefined on older mac SDKs.
@@ -47,7 +59,10 @@ stdenv.mkDerivation (finalAttrs: {
    ++ lib.optionals (!stdenv.hostPlatform.isGnu) [ "-Wno-int-conversion" ]
  );

  outputs = [ "out" "dev" ];
  outputs = [
    "out"
    "dev"
  ];

  postPatch = ''
    substituteInPlace src/CMakeLists.txt \
@@ -59,7 +74,10 @@ stdenv.mkDerivation (finalAttrs: {
    description = "Log forwarder and processor, part of Fluentd ecosystem";
    homepage = "https://fluentbit.io";
    license = lib.licenses.asl20;
    maintainers = [ lib.maintainers.samrose lib.maintainers.fpletz ];
    maintainers = with lib.maintainers; [
      samrose
      fpletz
    ];
    platforms = lib.platforms.unix;
  };
})
+0 −2
Original line number Diff line number Diff line
@@ -7832,8 +7832,6 @@ with pkgs;
    icu = icu63;
  };
  fluent-bit = darwin.apple_sdk_11_0.callPackage ../tools/misc/fluent-bit { };
  fluent-reader = callPackage ../applications/networking/feedreaders/fluent-reader { };
  flux = callPackage ../development/compilers/flux { };