2017-11-13 17:01:28 +00:00
|
|
|
{ stdenv, fetchFromGitHub, which, autoreconfHook, makeWrapper, writeScript,
|
|
|
|
ncurses, perl , cyrus_sasl, gss, gpgme, kerberos, libidn, notmuch, openssl,
|
|
|
|
lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42 }:
|
2016-04-15 21:01:05 +00:00
|
|
|
|
2017-10-14 05:17:50 +00:00
|
|
|
let
|
|
|
|
muttWrapper = writeScript "mutt" ''
|
|
|
|
#!${stdenv.shell} -eu
|
|
|
|
|
|
|
|
echo 'The neomutt project has renamed the main binary from `mutt` to `neomutt`.'
|
|
|
|
echo ""
|
|
|
|
echo 'This wrapper is provided for compatibility purposes only. You should start calling `neomutt` instead.'
|
|
|
|
echo ""
|
|
|
|
read -p 'Press any key to launch NeoMutt...' -n1 -s
|
|
|
|
exec neomutt "$@"
|
|
|
|
'';
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2017-10-28 03:20:47 +00:00
|
|
|
version = "20171027";
|
2016-04-15 21:01:05 +00:00
|
|
|
name = "neomutt-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2017-05-07 02:39:08 +00:00
|
|
|
owner = "neomutt";
|
|
|
|
repo = "neomutt";
|
|
|
|
rev = "neomutt-${version}";
|
2017-10-28 03:20:47 +00:00
|
|
|
sha256 = "0pwc5zdxc9h23658dfkzndfj1ld3ijyvcxmsiv793y3i4dig0s3n";
|
2016-04-15 21:01:05 +00:00
|
|
|
};
|
|
|
|
|
2017-06-02 13:41:03 +00:00
|
|
|
buildInputs = [
|
2017-06-29 02:43:09 +00:00
|
|
|
cyrus_sasl gss gpgme kerberos libidn ncurses
|
2017-11-13 17:01:28 +00:00
|
|
|
notmuch openssl perl lmdb makeWrapper
|
2017-06-02 13:41:03 +00:00
|
|
|
];
|
|
|
|
|
2017-10-14 05:17:50 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook docbook_xsl docbook_xml_dtd_42 libxslt.bin which ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
for f in doc/*.{xml,xsl}* ; do
|
|
|
|
substituteInPlace $f \
|
|
|
|
--replace http://docbook.sourceforge.net/release/xsl/current ${docbook_xsl}/share/xml/docbook-xsl \
|
|
|
|
--replace http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd ${docbook_xml_dtd_42}/xml/dtd/docbook/docbookx.dtd
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2016-04-15 21:01:05 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-debug"
|
|
|
|
"--enable-gpgme"
|
|
|
|
"--enable-notmuch"
|
|
|
|
"--with-curses"
|
2017-10-14 05:17:50 +00:00
|
|
|
"--with-gss"
|
|
|
|
"--with-homespool=mailbox"
|
2016-04-15 21:01:05 +00:00
|
|
|
"--with-idn"
|
2016-12-30 02:59:33 +00:00
|
|
|
"--with-lmdb"
|
2017-10-14 05:17:50 +00:00
|
|
|
"--with-mailpath="
|
|
|
|
"--with-sasl"
|
|
|
|
"--with-ssl"
|
2016-04-15 21:01:05 +00:00
|
|
|
|
|
|
|
# Look in $PATH at runtime, instead of hardcoding /usr/bin/sendmail
|
|
|
|
"ac_cv_path_SENDMAIL=sendmail"
|
|
|
|
];
|
|
|
|
|
2017-09-22 12:03:35 +00:00
|
|
|
# Fix missing libidn in mutt;
|
|
|
|
# this fix is ugly since it links all binaries in mutt against libidn
|
|
|
|
# like pgpring, pgpewrap, ...
|
|
|
|
NIX_LDFLAGS = "-lidn";
|
|
|
|
|
2017-10-14 05:17:50 +00:00
|
|
|
postInstall = ''
|
|
|
|
cp ${muttWrapper} $out/bin/mutt
|
2017-11-13 17:01:28 +00:00
|
|
|
wrapProgram "$out/bin/neomutt" --prefix PATH : "$out/lib/neomutt"
|
2017-10-14 05:17:50 +00:00
|
|
|
'';
|
2017-06-02 13:41:03 +00:00
|
|
|
|
2016-04-15 21:01:05 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A small but very powerful text-based mail client";
|
2017-09-09 01:30:41 +00:00
|
|
|
homepage = http://www.neomutt.org;
|
2017-09-14 06:42:25 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2017-06-29 02:43:09 +00:00
|
|
|
maintainers = with maintainers; [ cstrahan erikryb jfrankenau vrthra ];
|
2017-09-09 01:30:41 +00:00
|
|
|
platforms = platforms.unix;
|
2016-04-15 21:01:05 +00:00
|
|
|
};
|
|
|
|
}
|