From d962b800be2dfed92c65e2c1875b034028c603a7 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 31 Dec 2024 08:45:02 +0100 Subject: [PATCH] recutils: fix build --- pkgs/by-name/re/recutils/package.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pkgs/by-name/re/recutils/package.nix b/pkgs/by-name/re/recutils/package.nix index de1a79649fc1..47760d402025 100644 --- a/pkgs/by-name/re/recutils/package.nix +++ b/pkgs/by-name/re/recutils/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchurl, + fetchpatch, bc, check, curl, @@ -26,6 +27,14 @@ stdenv.mkDerivation rec { hash = "sha256-YwFZKwAgwUtFZ1fvXUNNSfYCe45fOkmdEzYvIFxIbg4="; }; + patches = [ + (fetchpatch { + name = "configure-big_sur.diff"; + url = "https://github.com/Homebrew/formula-patches/raw/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff"; + hash = "sha256-NazWrrwZhD8aKzpj6IC6zrD1J4qxrOZh5XpQLZ14yTw="; + }) + ]; + hardeningDisable = lib.optional stdenv.cc.isClang "format"; configureFlags = lib.optionals withBashBuiltins [ @@ -47,6 +56,16 @@ stdenv.mkDerivation rec { bash.dev ]; + env.NIX_CFLAGS_COMPILE = toString ( + lib.optionals stdenv.cc.isClang [ + "-Wno-error=implicit-function-declaration" + ] + ++ lib.optionals stdenv.cc.isGNU [ + "-Wno-error=implicit-function-declaration" + "-Wno-error=incompatible-pointer-types" + ] + ); + nativeCheckInputs = [ bc check