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-03-13 19:15:12 +00:00
|
|
|
, lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42, mailcap, runtimeShell, sqlite, zlib
|
2020-04-17 17:02:46 +01:00
|
|
|
, fetchpatch
|
2018-11-22 20:29:14 +00:00
|
|
|
}:
|
2016-04-15 22:01:05 +01:00
|
|
|
|
2019-06-23 13:17:53 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-17 17:02:46 +01:00
|
|
|
version = "20200417";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "neomutt";
|
2016-04-15 22:01:05 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2017-05-07 03:39:08 +01:00
|
|
|
owner = "neomutt";
|
|
|
|
repo = "neomutt";
|
2019-10-25 15:30:29 +01:00
|
|
|
rev = version;
|
2020-04-17 17:02:46 +01:00
|
|
|
sha256 = "0s7943r2s14kavyjf7i70vca252l626539i09a9vk0i9sfi35vx5";
|
2016-04-15 22:01:05 +01:00
|
|
|
};
|
|
|
|
|
2020-04-17 17:02:46 +01:00
|
|
|
patches = [
|
|
|
|
# Remove on next release. Fixes the `change-folder`
|
|
|
|
# macro (https://github.com/neomutt/neomutt/issues/2268)
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/neomutt/neomutt/commit/9e7537caddb9c6adc720bb3322a7512cf51ab025.patch";
|
|
|
|
sha256 = "1vmlvgnhx1ra3rnyjkpkv6lrqw8xfh2kkmqp43fqn9lnk3pkjxvv";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2017-06-02 14:41:03 +01:00
|
|
|
buildInputs = [
|
2017-06-29 03:43:09 +01: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 14:41:03 +01:00
|
|
|
];
|
|
|
|
|
2017-11-13 17:29:05 +00:00
|
|
|
nativeBuildInputs = [
|
2020-03-13 19:15:12 +00:00
|
|
|
docbook_xsl docbook_xml_dtd_42 gettext libxml2 libxslt.bin makeWrapper tcl which zlib
|
2017-11-13 17:29:05 +00:00
|
|
|
];
|
2017-10-14 06:17:50 +01: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 06:17:50 +01: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
|
2017-11-16 02:41:48 +00:00
|
|
|
substituteInPlace sendlib.c \
|
2018-11-22 20:29:14 +00:00
|
|
|
--replace /etc/mime.types ${mailcap}/etc/mime.types
|
2018-02-25 01:45:34 +00:00
|
|
|
|
|
|
|
# The string conversion tests all fail with the first version of neomutt
|
2018-07-18 17:50:59 +01:00
|
|
|
# that has tests (20180223) as well as 20180716 so we disable them for now.
|
2018-02-25 01:45:34 +00:00
|
|
|
# I don't know if that is related to the tests or our build environment.
|
|
|
|
# Try again with a later release.
|
|
|
|
sed -i '/rfc2047/d' test/Makefile.autosetup test/main.c
|
2017-10-14 06:17:50 +01:00
|
|
|
'';
|
|
|
|
|
2016-04-15 22:01:05 +01: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 06:17:50 +01:00
|
|
|
"--with-homespool=mailbox"
|
|
|
|
"--with-mailpath="
|
2016-04-15 22:01:05 +01: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 22:01:05 +01:00
|
|
|
];
|
|
|
|
|
2017-09-22 13:03:35 +01: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 06:17:50 +01:00
|
|
|
postInstall = ''
|
2018-04-06 18:20:03 +01:00
|
|
|
wrapProgram "$out/bin/neomutt" --prefix PATH : "$out/libexec/neomutt"
|
2017-10-14 06:17:50 +01:00
|
|
|
'';
|
2017-06-02 14:41:03 +01:00
|
|
|
|
2018-02-25 01:45:34 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2020-04-17 17:02:46 +01:00
|
|
|
preCheck = ''
|
|
|
|
cp -r ${fetchFromGitHub {
|
|
|
|
owner = "neomutt";
|
|
|
|
repo = "neomutt-test-files";
|
|
|
|
rev = "1ee274e9ae1330fb901eb7b8275b3079d7869222";
|
|
|
|
sha256 = "0dhilz4rr7616jh8jcvh50a3rr09in43nsv72mm6f3vfklcqincp";
|
|
|
|
}} $(pwd)/test-files
|
|
|
|
(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 17:02:46 +01:00
|
|
|
postCheck = "unset NEOMUTT_TEST_DIR";
|
2018-02-25 01:45:34 +00:00
|
|
|
|
2016-04-15 22:01:05 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A small but very powerful text-based mail client";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.neomutt.org";
|
2017-09-14 07:42:25 +01:00
|
|
|
license = licenses.gpl2Plus;
|
2020-03-13 15:52:36 +00:00
|
|
|
maintainers = with maintainers; [ cstrahan erikryb jfrankenau vrthra ma27 ];
|
2017-09-09 02:30:41 +01:00
|
|
|
platforms = platforms.unix;
|
2016-04-15 22:01:05 +01:00
|
|
|
};
|
|
|
|
}
|