From 23f28ec0a9d4b5c743df2a5a5ad2ab5088fbcbbe Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 28 Jan 2024 20:17:26 +0000 Subject: [PATCH] wordnet: fix build on `clang-16` Without the change build fails on `darwin` by default and on `linux` when `clang` is used explicitly: $ nix build --impure --expr 'with import {}; wordnet.override { stdenv = clangStdenv; }' -L ... wordnet> wn.c:132:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] wordnet> main(int argc,char *argv[]) wordnet> ^ wordnet> int The change disables warnings turned to errors on clang-16+. --- pkgs/applications/misc/wordnet/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/applications/misc/wordnet/default.nix b/pkgs/applications/misc/wordnet/default.nix index 88cc16ae7645..fccd7585e41e 100644 --- a/pkgs/applications/misc/wordnet/default.nix +++ b/pkgs/applications/misc/wordnet/default.nix @@ -18,6 +18,9 @@ stdenv.mkDerivation rec { sed "13i#define USE_INTERP_RESULT 1" -i src/stubs.c ''; + # Fails the build on clang-16 and on upcoming gcc-14. + env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-int"; + # Needs the path to `tclConfig.sh' and `tkConfig.sh'. configureFlags = [ "--with-tcl=${tcl}/lib"