2
0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-04-16 08:28:42 +00:00

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 <nixpkgs> {}; 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+.
This commit is contained in:
Sergei Trofimovich 2024-01-28 20:17:26 +00:00
parent 15fcb26b3c
commit 23f28ec0a9

View File

@ -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"