Merge pull request #260669 from tobim/pkgs/fluent-bit-darwin

fluent-bit: re-enable on darwin

authored by

Weijia Wang and committed by
GitHub
7ab327f7 d1507817

+15 -11
+14 -10
pkgs/tools/misc/fluent-bit/default.nix
··· 26 26 buildInputs = [ openssl libyaml postgresql ] 27 27 ++ lib.optionals stdenv.isLinux [ systemd ]; 28 28 29 - cmakeFlags = [ "-DFLB_METRICS=ON" "-DFLB_HTTP_SERVER=ON" "-DFLB_OUT_PGSQL=ON" ]; 29 + cmakeFlags = [ 30 + "-DFLB_RELEASE=ON" 31 + "-DFLB_METRICS=ON" 32 + "-DFLB_HTTP_SERVER=ON" 33 + "-DFLB_OUT_PGSQL=ON" 34 + ]; 30 35 31 - # _FORTIFY_SOURCE requires compiling with optimization (-O) 32 - env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [ "-O" ] 33 - # Workaround build failure on -fno-common toolchains: 34 - # ld: /monkey/mk_tls.h:81: multiple definition of `mk_tls_server_timeout'; 35 - # flb_config.c.o:include/monkey/mk_tls.h:81: first defined here 36 - # TODO: drop when upstream gets a fix for it: 37 - # https://github.com/fluent/fluent-bit/issues/5537 38 - ++ lib.optionals stdenv.isDarwin [ "-fcommon" ]); 36 + env.NIX_CFLAGS_COMPILE = toString ( 37 + # Used by the embedded luajit, but is not predefined on older mac SDKs. 38 + lib.optionals stdenv.isDarwin [ "-DTARGET_OS_IPHONE=0" ] 39 + # Assumes GNU version of strerror_r, and the posix version has an 40 + # incompatible return type. 41 + ++ lib.optionals (!stdenv.hostPlatform.isGnu) [ "-Wno-int-conversion" ] 42 + ); 39 43 40 44 outputs = [ "out" "dev" ]; 41 45 ··· 50 54 homepage = "https://fluentbit.io"; 51 55 license = lib.licenses.asl20; 52 56 maintainers = [ lib.maintainers.samrose lib.maintainers.fpletz ]; 53 - platforms = lib.platforms.linux; 57 + platforms = lib.platforms.unix; 54 58 }; 55 59 })
+1 -1
pkgs/top-level/all-packages.nix
··· 8157 8157 icu = icu63; 8158 8158 }; 8159 8159 8160 - fluent-bit = callPackage ../tools/misc/fluent-bit { }; 8160 + fluent-bit = darwin.apple_sdk_11_0.callPackage ../tools/misc/fluent-bit { }; 8161 8161 8162 8162 fluent-reader = callPackage ../applications/networking/feedreaders/fluent-reader { }; 8163 8163