about summary refs log tree commit diff
path: root/pkgs/tools/misc/fluent-bit
diff options
context:
space:
mode:
authorSebastián Mancilla <smancill@smancill.dev>2021-11-22 20:28:20 -0300
committerSebastián Mancilla <smancill@smancill.dev>2021-11-22 20:32:35 -0300
commite40ebf0bf7e7314649928f219ae78e2a5585b656 (patch)
treed5bcfbc1a38842f555bdf6edaaa7730d7ae127c5 /pkgs/tools/misc/fluent-bit
parentfbd3124b92cc7ba1b354261c9aba092d2f2b3c20 (diff)
fluent-bit: use upstream patches
Follow up to 09a54b14cd1 (fluent-bit: fix build on darwin, 2021-11-20),
now with upstream patches.
Diffstat (limited to 'pkgs/tools/misc/fluent-bit')
-rw-r--r--pkgs/tools/misc/fluent-bit/default.nix18
-rw-r--r--pkgs/tools/misc/fluent-bit/fix-cmetrics-darwin.patch23
2 files changed, 16 insertions, 25 deletions
diff --git a/pkgs/tools/misc/fluent-bit/default.nix b/pkgs/tools/misc/fluent-bit/default.nix
index 713b1df0c4e93..f6dd32396d841 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 8bd77605cbc07..0000000000000
--- 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 <cmetrics/cmt_info.h>
- 
- /* MacOS */
--#ifdef FLB_HAVE_CLOCK_GET_TIME
-+#ifdef CMT_HAVE_CLOCK_GET_TIME
- #include <mach/clock.h>
- #include <mach/mach.h>
- #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);