2018-02-15 06:58:49 -08:00
|
|
|
{ stdenv, fetchFromGitHub, gettext, makeWrapper, tcl, which, writeScript
|
2018-02-24 17:45:34 -08:00
|
|
|
, ncurses, perl , cyrus_sasl, gss, gpgme, kerberos, libidn, libxml2, notmuch, openssl
|
2020-06-08 07:01:42 -07:00
|
|
|
, lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42, elinks, mailcap, runtimeShell, sqlite, zlib
|
2020-04-24 13:03:30 -07:00
|
|
|
, glibcLocales
|
2018-11-22 12:29:14 -08:00
|
|
|
}:
|
2016-04-15 14:01:05 -07:00
|
|
|
|
2019-06-23 05:17:53 -07:00
|
|
|
stdenv.mkDerivation rec {
|
2020-06-26 05:53:58 -07:00
|
|
|
version = "20200626";
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "neomutt";
|
2016-04-15 14:01:05 -07:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2017-05-06 19:39:08 -07:00
|
|
|
owner = "neomutt";
|
|
|
|
repo = "neomutt";
|
2019-10-25 07:30:29 -07:00
|
|
|
rev = version;
|
2020-06-26 05:53:58 -07:00
|
|
|
sha256 = "0r16fy02z61dbjdxc28yzj5i4f6r7aakh453gaqc8ilm1nsxhmnp";
|
2016-04-15 14:01:05 -07:00
|
|
|
};
|
|
|
|
|
2017-06-02 06:41:03 -07:00
|
|
|
buildInputs = [
|
2017-06-28 19:43:09 -07:00
|
|
|
cyrus_sasl gss gpgme kerberos libidn ncurses
|
2017-11-13 09:29:05 -08:00
|
|
|
notmuch openssl perl lmdb
|
2019-11-06 01:38:11 -08:00
|
|
|
mailcap sqlite
|
2017-06-02 06:41:03 -07:00
|
|
|
];
|
|
|
|
|
2017-11-13 09:29:05 -08:00
|
|
|
nativeBuildInputs = [
|
2020-06-08 07:01:42 -07:00
|
|
|
docbook_xsl docbook_xml_dtd_42 gettext libxml2 libxslt.bin makeWrapper tcl which zlib elinks
|
2017-11-13 09:29:05 -08:00
|
|
|
];
|
2017-10-13 22:17:50 -07:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
postPatch = ''
|
2018-02-26 00:12:28 -08:00
|
|
|
substituteInPlace contrib/smime_keys \
|
|
|
|
--replace /usr/bin/openssl ${openssl}/bin/openssl
|
|
|
|
|
2017-10-13 22:17:50 -07:00
|
|
|
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
|
2017-11-15 18:41:48 -08:00
|
|
|
|
2018-11-22 12:29:14 -08:00
|
|
|
|
2017-11-15 18:41:48 -08:00
|
|
|
# allow neomutt to map attachments to their proper mime.types if specified wrongly
|
2017-11-18 01:15:20 -08:00
|
|
|
# and use a far more comprehensive list than the one shipped with neomutt
|
2017-11-15 18:41:48 -08:00
|
|
|
substituteInPlace sendlib.c \
|
2018-11-22 12:29:14 -08:00
|
|
|
--replace /etc/mime.types ${mailcap}/etc/mime.types
|
2017-10-13 22:17:50 -07:00
|
|
|
'';
|
|
|
|
|
2020-06-19 10:19:08 -07:00
|
|
|
preBuild = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2016-04-15 14:01:05 -07:00
|
|
|
configureFlags = [
|
2019-11-06 01:38:11 -08:00
|
|
|
"--enable-autocrypt"
|
2018-02-15 06:58:49 -08:00
|
|
|
"--gpgme"
|
|
|
|
"--gss"
|
|
|
|
"--lmdb"
|
|
|
|
"--notmuch"
|
|
|
|
"--ssl"
|
|
|
|
"--sasl"
|
2017-10-13 22:17:50 -07:00
|
|
|
"--with-homespool=mailbox"
|
|
|
|
"--with-mailpath="
|
2020-06-08 06:59:31 -07:00
|
|
|
# To make it not reference .dev outputs. See:
|
|
|
|
# https://github.com/neomutt/neomutt/pull/2367
|
|
|
|
"--disable-include-path-in-cflags"
|
2016-04-15 14:01:05 -07:00
|
|
|
# Look in $PATH at runtime, instead of hardcoding /usr/bin/sendmail
|
|
|
|
"ac_cv_path_SENDMAIL=sendmail"
|
2020-03-13 12:15:12 -07:00
|
|
|
"--zlib"
|
2016-04-15 14:01:05 -07:00
|
|
|
];
|
|
|
|
|
2017-09-22 05:03:35 -07: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-13 22:17:50 -07:00
|
|
|
postInstall = ''
|
2018-04-06 10:20:03 -07:00
|
|
|
wrapProgram "$out/bin/neomutt" --prefix PATH : "$out/libexec/neomutt"
|
2017-10-13 22:17:50 -07:00
|
|
|
'';
|
2017-06-02 06:41:03 -07:00
|
|
|
|
2018-02-24 17:45:34 -08:00
|
|
|
doCheck = true;
|
|
|
|
|
2020-04-17 09:02:46 -07:00
|
|
|
preCheck = ''
|
|
|
|
cp -r ${fetchFromGitHub {
|
|
|
|
owner = "neomutt";
|
|
|
|
repo = "neomutt-test-files";
|
2020-06-19 10:19:08 -07:00
|
|
|
rev = "8629adab700a75c54e8e28bf05ad092503a98f75";
|
|
|
|
sha256 = "1ci04nqkab9mh60zzm66sd6mhsr6lya8wp92njpbvafc86vvwdlr";
|
2020-04-17 09:02:46 -07:00
|
|
|
}} $(pwd)/test-files
|
2020-06-19 10:19:08 -07:00
|
|
|
chmod -R +w test-files
|
2020-04-17 09:02:46 -07:00
|
|
|
(cd test-files && ./setup.sh)
|
|
|
|
|
|
|
|
export NEOMUTT_TEST_DIR=$(pwd)/test-files
|
|
|
|
'';
|
|
|
|
|
2018-02-24 17:45:34 -08:00
|
|
|
checkTarget = "test";
|
2020-04-17 09:02:46 -07:00
|
|
|
postCheck = "unset NEOMUTT_TEST_DIR";
|
2018-02-24 17:45:34 -08:00
|
|
|
|
2016-04-15 14:01:05 -07:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A small but very powerful text-based mail client";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "http://www.neomutt.org";
|
2017-09-13 23:42:25 -07:00
|
|
|
license = licenses.gpl2Plus;
|
2020-03-13 08:52:36 -07:00
|
|
|
maintainers = with maintainers; [ cstrahan erikryb jfrankenau vrthra ma27 ];
|
2017-09-08 18:30:41 -07:00
|
|
|
platforms = platforms.unix;
|
2016-04-15 14:01:05 -07:00
|
|
|
};
|
|
|
|
}
|