2023-12-25 13:07:45 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, gettext, makeWrapper, tcl, which
|
2023-05-13 09:38:12 +00:00
|
|
|
, ncurses, perl , cyrus_sasl, gss, gpgme, libkrb5, libidn2, libxml2, notmuch, openssl
|
2023-04-21 12:08:00 +00:00
|
|
|
, lua, lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42, w3m, mailcap, sqlite, zlib, lndir
|
2023-03-23 12:19:30 +00:00
|
|
|
, pkg-config, zstd, enableZstd ? true, enableMixmaster ? false, enableLua ? false
|
2023-04-21 12:08:00 +00:00
|
|
|
, withContrib ? true
|
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 {
|
2023-12-25 13:07:45 +00:00
|
|
|
version = "20231221";
|
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;
|
2023-12-25 13:07:45 +00:00
|
|
|
sha256 = "sha256-IXly2N/DD2+XBXVIXJw1sE/0eJwbUaONDNRMi7n1T44=";
|
2016-04-15 21:01:05 +00:00
|
|
|
};
|
|
|
|
|
2017-06-02 13:41:03 +00:00
|
|
|
buildInputs = [
|
2023-05-13 09:38:12 +00:00
|
|
|
cyrus_sasl gss gpgme libkrb5 libidn2 ncurses
|
2017-11-13 17:29:05 +00:00
|
|
|
notmuch openssl perl lmdb
|
2019-11-06 09:38:11 +00:00
|
|
|
mailcap sqlite
|
2022-08-14 12:22:27 +00:00
|
|
|
]
|
2023-03-23 12:19:30 +00:00
|
|
|
++ lib.optional enableZstd zstd
|
|
|
|
++ lib.optional enableLua lua;
|
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
|
2023-03-23 12:19:30 +00:00
|
|
|
pkg-config
|
2017-11-13 17:29:05 +00:00
|
|
|
];
|
2017-10-14 05:17:50 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
postPatch = ''
|
2022-06-27 15:00:58 +00:00
|
|
|
substituteInPlace auto.def --replace /usr/sbin/sendmail sendmail
|
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
|
|
|
'';
|
|
|
|
|
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"
|
2020-03-13 19:15:12 +00:00
|
|
|
"--zlib"
|
2022-08-14 12:22:27 +00:00
|
|
|
]
|
|
|
|
++ lib.optional enableZstd "--zstd"
|
2023-03-23 12:19:30 +00:00
|
|
|
++ lib.optional enableLua "--lua"
|
2022-08-14 12:22:27 +00:00
|
|
|
++ lib.optional enableMixmaster "--mixmaster";
|
2016-04-15 21:01:05 +00:00
|
|
|
|
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"
|
2023-04-21 12:08:00 +00:00
|
|
|
''
|
|
|
|
# https://github.com/neomutt/neomutt-contrib
|
|
|
|
# Contains vim-keys, keybindings presets and more.
|
|
|
|
+ lib.optionalString withContrib "${lib.getExe lndir} ${passthru.contrib} $out/share/doc/neomutt";
|
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 = ''
|
2023-04-21 12:08:00 +00:00
|
|
|
cp -r ${passthru.test-files} $(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
|
|
|
|
'';
|
|
|
|
|
2023-04-21 12:08:00 +00:00
|
|
|
passthru = {
|
|
|
|
test-files = fetchFromGitHub {
|
|
|
|
owner = "neomutt";
|
|
|
|
repo = "neomutt-test-files";
|
|
|
|
rev = "1569b826a56c39fd09f7c6dd5fc1163ff5a356a2";
|
|
|
|
sha256 = "sha256-MaH2zEH1Wq3C0lFxpEJ+b/A+k2aKY/sr1EtSPAuRPp8=";
|
|
|
|
};
|
|
|
|
contrib = fetchFromGitHub {
|
|
|
|
owner = "neomutt";
|
|
|
|
repo = "neomutt-contrib";
|
|
|
|
rev = "8e97688693ca47ea1055f3d15055a4f4ecc5c832";
|
|
|
|
sha256 = "sha256-tx5Y819rNDxOpjg3B/Y2lPcqJDArAxVwjbYarVmJ79k=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
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
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-04-15 21:01:05 +00:00
|
|
|
description = "A small but very powerful text-based mail client";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "neomutt";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.neomutt.org";
|
2017-09-14 06:42:25 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2023-11-12 21:56:54 +00:00
|
|
|
maintainers = with maintainers; [ erikryb vrthra ma27 raitobezarius ];
|
2017-09-09 01:30:41 +00:00
|
|
|
platforms = platforms.unix;
|
2016-04-15 21:01:05 +00:00
|
|
|
};
|
|
|
|
}
|