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.
This commit is contained in:
Sergei Trofimovich 2024-02-18 10:45:40 +00:00
parent 35c5863c29
commit 5e1a6504e2

View File

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