From 296f222cf8924d8c2ca52d19e962b673b39cac84 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Thu, 4 Sep 2025 10:48:14 +0200 Subject: [PATCH] postgresql18Packages.pg_hll: fix on darwin Disabling the `missing-variable-declarations` warning only was part of the solution, it didn't fix darwin builds. Applying upstream's patch fixes it on all platforms. It will also warn us via build failure when this isn't needed anymore. Win-win! --- pkgs/servers/sql/postgresql/ext/pg_hll.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sql/postgresql/ext/pg_hll.nix b/pkgs/servers/sql/postgresql/ext/pg_hll.nix index bd3bd7bcdb09..0354b6c337af 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_hll.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_hll.nix @@ -1,5 +1,6 @@ { fetchFromGitHub, + fetchpatch, lib, postgresql, postgresqlBuildExtension, @@ -16,8 +17,13 @@ postgresqlBuildExtension (finalAttrs: { hash = "sha256-Latdxph1Ura8yKEokEjalJ+/GY+pAKOT3GXjuLprj6c="; }; - # https://github.com/citusdata/postgresql-hll/issues/166#issuecomment-3165489050 - NIX_CFLAGS_COMPILE = "-Wno-error=missing-variable-declarations"; + patches = [ + (fetchpatch { + name = "fix-postgresql-18.patch"; + url = "https://github.com/citusdata/postgresql-hll/commit/f998e234653ea397ddddc1278d1c02d8d011bd16.patch"; + hash = "sha256-gF4f+B4Gu/QEyCGMfKLmRK6lNwgfd8lML55wMkhsSY4="; + }) + ]; meta = { description = "HyperLogLog for PostgreSQL";