From d75276a28e60bd3105669eb0da1a13e418c518bd Mon Sep 17 00:00:00 2001 From: Justin Humm Date: Wed, 25 Nov 2020 10:09:05 +0100 Subject: [PATCH] meli: fix runtime error with libnotmuch5 > libnotmuch5 was not found in your system. Make sure it is installed and in the library paths. > notmuch is not a valid mail backend --- .../networking/mailreaders/meli/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/mailreaders/meli/default.nix b/pkgs/applications/networking/mailreaders/meli/default.nix index 1abaeb6f1656..4f3a1ef3901f 100644 --- a/pkgs/applications/networking/mailreaders/meli/default.nix +++ b/pkgs/applications/networking/mailreaders/meli/default.nix @@ -8,6 +8,7 @@ , sqlite , file , gzip +, makeWrapper , notmuch # Build with support for notmuch backend , withNotmuch ? true @@ -27,7 +28,7 @@ rustPlatform.buildRustPackage rec { cargoBuildFlags = lib.optional withNotmuch "--features=notmuch"; - nativeBuildInputs = [ pkgconfig gzip ]; + nativeBuildInputs = [ pkgconfig gzip makeWrapper ]; buildInputs = [ openssl dbus sqlite ] ++ lib.optional withNotmuch notmuch; @@ -39,6 +40,13 @@ rustPlatform.buildRustPackage rec { mkdir -p $out/share/man/man5 gzip < docs/meli.conf.5 > $out/share/man/man5/meli.conf.5.gz gzip < docs/meli-themes.5 > $out/share/man/man5/meli-themes.5.gz + '' + lib.optionalString withNotmuch '' + # Fixes this runtime error when meli is started with notmuch configured: + # $ meli + # libnotmuch5 was not found in your system. Make sure it is installed and + # in the library paths. + # notmuch is not a valid mail backend + wrapProgram $out/bin/meli --set LD_LIBRARY_PATH ${notmuch}/lib ''; meta = with stdenv.lib; {