From 5e1a6504e2bc38c17fe6ca5629b7e6b141349840 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 18 Feb 2024 10:45:40 +0000 Subject: [PATCH] bip: drop blanket -Werror Without the change the build fails on `master` as https://hydra.nixos.org/build/249146359: In function 'array_count', inlined from 'irc_line_free' at line.c:220:18: util.h:206:17: error: null pointer dereference [-Werror=null-dereference] 206 | return a->elemc; | ~^~~~~~~ Instead of disabling another warning let's drop blanket `-Werror`. While at it enabled parallel builds by default. --- pkgs/applications/networking/irc/bip/default.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/networking/irc/bip/default.nix b/pkgs/applications/networking/irc/bip/default.nix index f1a611263614..2eb1b5d8607f 100644 --- a/pkgs/applications/networking/irc/bip/default.nix +++ b/pkgs/applications/networking/irc/bip/default.nix @@ -1,9 +1,8 @@ { lib , stdenv , fetchurl +, autoreconfHook , pkg-config -, autoconf -, automake , bison , flex , openssl @@ -21,12 +20,17 @@ stdenv.mkDerivation { outputs = [ "out" "man" "doc" ]; - nativeBuildInputs = [ pkg-config autoconf automake ]; + postPatch = '' + # Drop blanket -Werror to avoid build failure on fresh toolchains + # and libraries. Without the cnage build fails on gcc-13 and on + # openssl-3. + substituteInPlace src/Makefile.am --replace-fail ' -Werror ' ' ' + ''; + + nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ bison flex openssl ]; - # FIXME: Openssl3 deprecated PEM_read_DHparams and DH_free - # https://projects.duckcorp.org/issues/780 - env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; + enableParallelBuilding = true; meta = { description = "An IRC proxy (bouncer)";