From 1cbf12663c52e38c9d35c92494b45d28664b5dfe Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 2 Nov 2022 08:02:42 +0000 Subject: [PATCH] cvise: disable blanket -Werror `-Werror` flag usually causes build failures due to minor changes in compiler versions. They might be useful for developers themselves but are rarely useful for distributions. For example right now `cvise` fails to compile on `gcc-13` due to a `gcc` infelicity: https://gcc.gnu.org/PR107488 While this concrete instance is a compiler bug generally `-Werror` makes users' lives harder. Specific `-Werror=` are better way to prevent certain classes of bugs. The change removes blanket `-Werror` with a `substituteInPlace` call. --- pkgs/development/tools/misc/cvise/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/tools/misc/cvise/default.nix b/pkgs/development/tools/misc/cvise/default.nix index cd3a38d300ef..ae0846f479ca 100644 --- a/pkgs/development/tools/misc/cvise/default.nix +++ b/pkgs/development/tools/misc/cvise/default.nix @@ -32,6 +32,11 @@ buildPythonApplication rec { ]; postPatch = '' + # Avoid blanket -Werror to evade build failures on less + # tested compilers. + substituteInPlace CMakeLists.txt \ + --replace " -Werror " " " + # 'cvise --command=...' generates a script with hardcoded shebang. substituteInPlace cvise.py \ --replace "#!/bin/bash" "#!${bash}/bin/bash"