From e40ebf0bf7e7314649928f219ae78e2a5585b656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Mancilla?= Date: Mon, 22 Nov 2021 20:28:20 -0300 Subject: [PATCH] fluent-bit: use upstream patches Follow up to 09a54b14cd1 (fluent-bit: fix build on darwin, 2021-11-20), now with upstream patches. --- pkgs/tools/misc/fluent-bit/default.nix | 18 +++++++++++++-- .../misc/fluent-bit/fix-cmetrics-darwin.patch | 23 ------------------- 2 files changed, 16 insertions(+), 25 deletions(-) delete mode 100644 pkgs/tools/misc/fluent-bit/fix-cmetrics-darwin.patch diff --git a/pkgs/tools/misc/fluent-bit/default.nix b/pkgs/tools/misc/fluent-bit/default.nix index 713b1df0c4e9..f6dd32396d84 100644 --- a/pkgs/tools/misc/fluent-bit/default.nix +++ b/pkgs/tools/misc/fluent-bit/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, cmake, flex, bison, systemd }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, flex, bison, systemd }: stdenv.mkDerivation rec { pname = "fluent-bit"; @@ -12,7 +12,21 @@ stdenv.mkDerivation rec { }; patches = lib.optionals stdenv.isDarwin [ - ./fix-cmetrics-darwin.patch + # Fix compilations errors on darwin + (fetchpatch { + url = "https://github.com/calyptia/cmetrics/commit/4f0f7ae2eeec148a69156f9fcc05d64bf249d11e.patch"; + sha256 = "sha256-M1+28mHxpMvcFkOoKxkMMo1VCQsG33ncFZkFalOq2FQ="; + stripLen = 1; + extraPrefix = "lib/cmetrics/"; + }) + (fetchpatch { + url = "https://github.com/calyptia/cmetrics/commit/a97999cb6d7299ef230d216b7a1c584b43c64de9.patch"; + sha256 = "sha256-RuyPEeILc86n/klPIb334XpX0F71nskQ8s/ya0rE2zI="; + stripLen = 1; + extraPrefix = "lib/cmetrics/"; + }) + + # Fix bundled luajit compilation args ./fix-luajit-darwin.patch ]; diff --git a/pkgs/tools/misc/fluent-bit/fix-cmetrics-darwin.patch b/pkgs/tools/misc/fluent-bit/fix-cmetrics-darwin.patch deleted file mode 100644 index 8bd77605cbc0..000000000000 --- a/pkgs/tools/misc/fluent-bit/fix-cmetrics-darwin.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git i/lib/cmetrics/src/cmt_time.c w/lib/cmetrics/src/cmt_time.c ---- i/lib/cmetrics/src/cmt_time.c -+++ w/lib/cmetrics/src/cmt_time.c -@@ -20,7 +20,7 @@ - #include - - /* MacOS */ --#ifdef FLB_HAVE_CLOCK_GET_TIME -+#ifdef CMT_HAVE_CLOCK_GET_TIME - #include - #include - #endif -@@ -41,8 +41,8 @@ - mach_timespec_t mts; - host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); - clock_get_time(cclock, &mts); -- tm->tv_sec = mts.tv_sec; -- tm->tv_nsec = mts.tv_nsec; -+ tm.tv_sec = mts.tv_sec; -+ tm.tv_nsec = mts.tv_nsec; - mach_port_deallocate(mach_task_self(), cclock); - #else /* __STDC_VERSION__ */ - clock_gettime(CLOCK_REALTIME, &tm);