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