From fd2982de56099d98a725b594603cb65c4a20073a Mon Sep 17 00:00:00 2001 From: Amir Yalon Date: Mon, 17 Jun 2024 11:38:12 +0300 Subject: [PATCH] Build sphinxsearch using the old c++98 standard Various warnings are emitted when building in Darwin environments, apparently due to the use of Clang as opposed to GCC. We could continue to add more `-Wno-xxx` flags as they arise, either with the existing `stdenv.isDarwin` condition or with the more correct `stdenv.cc.isClang`, but for an older codebase it seems more prodent to stick with the latest standard where it builds cleanly. The newer `-std=c++11` was also attempted, but it still failed to build. --- pkgs/servers/search/sphinxsearch/default.nix | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pkgs/servers/search/sphinxsearch/default.nix b/pkgs/servers/search/sphinxsearch/default.nix index 0b34c1f44a8f0..58887c5ef5e3d 100644 --- a/pkgs/servers/search/sphinxsearch/default.nix +++ b/pkgs/servers/search/sphinxsearch/default.nix @@ -31,13 +31,7 @@ stdenv.mkDerivation rec { expat ]; - CXXFLAGS = lib.concatStringsSep " " (lib.optionals stdenv.isDarwin [ - # see upstream bug: http://sphinxsearch.com/bugs/view.php?id=2578 - # workaround for "error: invalid suffix on literal - "-Wno-reserved-user-defined-literal" - # workaround for "error: non-constant-expression cannot be narrowed from type 'long' to 'int'" - "-Wno-c++11-narrowing" - ]); + CXXFLAGS = "-std=c++98"; meta = { description = "Open source full text search server";