2019-09-20 20:01:13 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchgit
|
|
|
|
, rustPlatform
|
|
|
|
, pkgconfig
|
|
|
|
, openssl
|
|
|
|
, dbus
|
|
|
|
, sqlite
|
|
|
|
, file
|
|
|
|
, gzip
|
2020-11-25 09:09:05 +00:00
|
|
|
, makeWrapper
|
2019-09-20 20:01:13 +01:00
|
|
|
, notmuch
|
|
|
|
# Build with support for notmuch backend
|
|
|
|
, withNotmuch ? true
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "meli";
|
2020-09-30 11:29:07 +01:00
|
|
|
version = "alpha-0.6.2";
|
2019-09-20 20:01:13 +01:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.meli.delivery/meli/meli.git";
|
|
|
|
rev = version;
|
2020-09-30 11:29:07 +01:00
|
|
|
sha256 = "0ycyksrrp4llwklzx3ipac8hmpfxa1pa7dqsm82wic0f6p5d1dp6";
|
2019-09-20 20:01:13 +01:00
|
|
|
};
|
|
|
|
|
2020-09-30 11:29:07 +01:00
|
|
|
cargoSha256 = "sha256:0lxwhb2c16w5z7rqzch0ij8n8hxb5xcin31w9i28mzv1xm7sg8ks";
|
2019-09-20 20:01:13 +01:00
|
|
|
|
|
|
|
cargoBuildFlags = lib.optional withNotmuch "--features=notmuch";
|
|
|
|
|
2020-11-25 09:09:05 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig gzip makeWrapper ];
|
2019-09-20 20:01:13 +01:00
|
|
|
|
|
|
|
buildInputs = [ openssl dbus sqlite ] ++ lib.optional withNotmuch notmuch;
|
|
|
|
|
|
|
|
checkInputs = [ file ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/man/man1
|
2020-09-30 11:29:07 +01:00
|
|
|
gzip < docs/meli.1 > $out/share/man/man1/meli.1.gz
|
2019-09-20 20:01:13 +01:00
|
|
|
mkdir -p $out/share/man/man5
|
2020-09-30 11:29:07 +01:00
|
|
|
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
|
2020-11-25 09:09:05 +00:00
|
|
|
'' + 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
|
2019-09-20 20:01:13 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-09-20 20:01:13 +01:00
|
|
|
description = "Experimental terminal mail client aiming for configurability and extensibility with sane defaults";
|
|
|
|
homepage = "https://meli.delivery";
|
|
|
|
license = licenses.gpl3;
|
2020-07-29 11:49:07 +01:00
|
|
|
maintainers = with maintainers; [ _0x4A6F matthiasbeyer erictapen ];
|
2019-09-20 20:01:13 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|