From dce3b1ee5dadf2e20542ea09101ca6cf257dddea Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Wed, 26 Apr 2023 05:00:00 -0500 Subject: [PATCH] notmuch: fix darwin build notmuch tries to compile the ruby binding with custom CFLAGS which collides with the CFLAGS created by Ruby mkmf. This caused notmuch to fail on Darwin, because it requires `-fdeclspec` and it was removed from CFLAGS. --- pkgs/applications/networking/mailreaders/notmuch/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/applications/networking/mailreaders/notmuch/default.nix b/pkgs/applications/networking/mailreaders/notmuch/default.nix index 3dccf614fb964..0a62ee3e33796 100644 --- a/pkgs/applications/networking/mailreaders/notmuch/default.nix +++ b/pkgs/applications/networking/mailreaders/notmuch/default.nix @@ -42,6 +42,10 @@ stdenv.mkDerivation rec { substituteInPlace lib/Makefile.local \ --replace '-install_name $(libdir)' "-install_name $out/lib" + + # do not override CFLAGS of the Makefile created by mkmf + substituteInPlace bindings/Makefile.local \ + --replace 'CFLAGS="$(CFLAGS) -pipe -fno-plt -fPIC"' "" '' + lib.optionalString withEmacs '' substituteInPlace emacs/notmuch-emacs-mua \ --replace 'EMACS:-emacs' 'EMACS:-${emacs}/bin/emacs' \