4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
60 lines
1.7 KiB
Nix
60 lines
1.7 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchgit
|
|
, rustPlatform
|
|
, pkgconfig
|
|
, openssl
|
|
, dbus
|
|
, sqlite
|
|
, file
|
|
, gzip
|
|
, makeWrapper
|
|
, notmuch
|
|
# Build with support for notmuch backend
|
|
, withNotmuch ? true
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "meli";
|
|
version = "alpha-0.6.2";
|
|
|
|
src = fetchgit {
|
|
url = "https://git.meli.delivery/meli/meli.git";
|
|
rev = version;
|
|
sha256 = "0ycyksrrp4llwklzx3ipac8hmpfxa1pa7dqsm82wic0f6p5d1dp6";
|
|
};
|
|
|
|
cargoSha256 = "sha256:0lxwhb2c16w5z7rqzch0ij8n8hxb5xcin31w9i28mzv1xm7sg8ks";
|
|
|
|
cargoBuildFlags = lib.optional withNotmuch "--features=notmuch";
|
|
|
|
nativeBuildInputs = [ pkgconfig gzip makeWrapper ];
|
|
|
|
buildInputs = [ openssl dbus sqlite ] ++ lib.optional withNotmuch notmuch;
|
|
|
|
checkInputs = [ file ];
|
|
|
|
postInstall = ''
|
|
mkdir -p $out/share/man/man1
|
|
gzip < docs/meli.1 > $out/share/man/man1/meli.1.gz
|
|
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 lib; {
|
|
description = "Experimental terminal mail client aiming for configurability and extensibility with sane defaults";
|
|
homepage = "https://meli.delivery";
|
|
license = licenses.gpl3;
|
|
maintainers = with maintainers; [ _0x4A6F matthiasbeyer erictapen ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|