From 31b0ba6846c2b251a80fbe3c6d1396a8bb99a18c Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Wed, 15 Nov 2023 22:05:13 -0500 Subject: [PATCH] groonga: fix build with clang 16 Prevent a warning about using a GNU extension from being treated as an error by clang. --- pkgs/servers/search/groonga/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/servers/search/groonga/default.nix b/pkgs/servers/search/groonga/default.nix index 7b7717828e17..fbf9f06cff72 100644 --- a/pkgs/servers/search/groonga/default.nix +++ b/pkgs/servers/search/groonga/default.nix @@ -31,6 +31,11 @@ stdenv.mkDerivation rec { optional zlibSupport "--with-zlib" ++ optional lz4Support "--with-lz4"; + env = lib.optionalAttrs stdenv.cc.isClang { + # Prevent warning about using a GNU extension from being promoted to an error. + NIX_CFLAGS_COMPILE = "-Wno-error=gnu-folding-constant"; + }; + doInstallCheck = true; installCheckPhase = "$out/bin/groonga --version";