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