2017-11-03 20:42:54 +00:00
|
|
|
{ stdenv, fetchurl, fetchpatch, ncurses, which, perl
|
2008-05-13 19:21:09 +00:00
|
|
|
, gdbm ? null
|
2007-08-06 12:18:55 +00:00
|
|
|
, openssl ? null
|
2010-04-12 22:21:01 +00:00
|
|
|
, cyrus_sasl ? null
|
2017-11-03 20:42:54 +00:00
|
|
|
, gnupg ? null
|
2011-10-25 17:46:26 +00:00
|
|
|
, gpgme ? null
|
2017-09-04 20:00:30 +00:00
|
|
|
, kerberos ? null
|
2016-07-09 03:13:52 +00:00
|
|
|
, headerCache ? true
|
|
|
|
, sslSupport ? true
|
|
|
|
, saslSupport ? true
|
2017-11-03 20:42:54 +00:00
|
|
|
, smimeSupport ? false
|
|
|
|
, gpgSupport ? false
|
2016-07-09 03:13:52 +00:00
|
|
|
, gpgmeSupport ? true
|
|
|
|
, imapSupport ? true
|
2016-09-19 01:53:03 +00:00
|
|
|
, withSidebar ? true
|
2017-09-04 20:00:30 +00:00
|
|
|
, gssSupport ? true
|
2007-08-06 12:18:55 +00:00
|
|
|
}:
|
|
|
|
|
2016-07-09 03:13:52 +00:00
|
|
|
assert headerCache -> gdbm != null;
|
|
|
|
assert sslSupport -> openssl != null;
|
|
|
|
assert saslSupport -> cyrus_sasl != null;
|
2017-11-03 20:42:54 +00:00
|
|
|
assert smimeSupport -> openssl != null;
|
|
|
|
assert gpgSupport -> gnupg != null;
|
|
|
|
assert gpgmeSupport -> gpgme != null && openssl != null;
|
2016-07-09 03:13:52 +00:00
|
|
|
|
|
|
|
with stdenv.lib;
|
2007-08-05 18:23:53 +00:00
|
|
|
|
2011-08-09 20:21:05 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2016-07-09 03:13:52 +00:00
|
|
|
name = "mutt-${version}";
|
2019-02-22 15:45:09 +00:00
|
|
|
version = "1.11.3";
|
2014-11-09 14:55:19 +00:00
|
|
|
|
2007-08-05 18:23:53 +00:00
|
|
|
src = fetchurl {
|
2016-07-09 03:13:52 +00:00
|
|
|
url = "http://ftp.mutt.org/pub/mutt/${name}.tar.gz";
|
2019-02-22 15:45:09 +00:00
|
|
|
sha256 = "0h8rmcc62n1pagm7mjjccd5fxyhhi4vbvp8m88digkdf5z0g8hm5";
|
2007-08-05 18:23:53 +00:00
|
|
|
};
|
2010-07-24 08:50:30 +00:00
|
|
|
|
2017-11-03 20:42:54 +00:00
|
|
|
patches = optional smimeSupport (fetchpatch {
|
2019-02-05 00:53:14 +00:00
|
|
|
url = "https://salsa.debian.org/mutt-team/mutt/raw/debian/1.11.3-2/debian/patches/misc/smime.rc.patch";
|
2018-11-22 20:29:14 +00:00
|
|
|
sha256 = "1rl27qqwl4nw321ll5jcvfmkmz4fkvcsh5vihjcrhzzyf6vz8wmj";
|
2017-11-03 20:42:54 +00:00
|
|
|
});
|
2016-11-10 00:42:18 +00:00
|
|
|
|
2016-07-09 03:13:52 +00:00
|
|
|
buildInputs =
|
2014-11-19 15:02:41 +00:00
|
|
|
[ ncurses which perl ]
|
2016-07-09 03:13:52 +00:00
|
|
|
++ optional headerCache gdbm
|
|
|
|
++ optional sslSupport openssl
|
2017-09-04 20:00:30 +00:00
|
|
|
++ optional gssSupport kerberos
|
2016-07-09 03:13:52 +00:00
|
|
|
++ optional saslSupport cyrus_sasl
|
2016-09-19 01:53:03 +00:00
|
|
|
++ optional gpgmeSupport gpgme;
|
2014-11-09 14:55:19 +00:00
|
|
|
|
2007-08-06 12:18:55 +00:00
|
|
|
configureFlags = [
|
2016-07-09 03:13:52 +00:00
|
|
|
(enableFeature headerCache "hcache")
|
|
|
|
(enableFeature gpgmeSupport "gpgme")
|
|
|
|
(enableFeature imapSupport "imap")
|
|
|
|
(enableFeature withSidebar "sidebar")
|
|
|
|
"--enable-smtp"
|
|
|
|
"--enable-pop"
|
|
|
|
"--with-mailpath="
|
2010-09-06 07:17:20 +00:00
|
|
|
|
2015-04-11 22:31:08 +00:00
|
|
|
# Look in $PATH at runtime, instead of hardcoding /usr/bin/sendmail
|
|
|
|
"ac_cv_path_SENDMAIL=sendmail"
|
|
|
|
|
2010-09-06 07:17:20 +00:00
|
|
|
# This allows calls with "-d N", that output debug info into ~/.muttdebug*
|
2011-10-25 17:46:26 +00:00
|
|
|
"--enable-debug"
|
|
|
|
|
2010-04-12 22:10:15 +00:00
|
|
|
# The next allows building mutt without having anything setgid
|
|
|
|
# set by the installer, and removing the need for the group 'mail'
|
|
|
|
# I set the value 'mailbox' because it is a default in the configure script
|
|
|
|
"--with-homespool=mailbox"
|
2016-07-09 03:13:52 +00:00
|
|
|
] ++ optional sslSupport "--with-ssl"
|
2017-09-04 20:00:30 +00:00
|
|
|
++ optional gssSupport "--with-gss"
|
2016-07-09 03:13:52 +00:00
|
|
|
++ optional saslSupport "--with-sasl";
|
2008-01-30 19:49:42 +00:00
|
|
|
|
2017-11-03 20:42:54 +00:00
|
|
|
postPatch = optionalString (smimeSupport || gpgmeSupport) ''
|
|
|
|
sed -i 's#/usr/bin/openssl#${openssl}/bin/openssl#' smime_keys.pl
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = optionalString smimeSupport ''
|
|
|
|
# S/MIME setup
|
|
|
|
cp contrib/smime.rc $out/etc/smime.rc
|
|
|
|
sed -i 's#openssl#${openssl}/bin/openssl#' $out/etc/smime.rc
|
|
|
|
echo "source $out/etc/smime.rc" >> $out/etc/Muttrc
|
|
|
|
'' + optionalString gpgSupport ''
|
|
|
|
# GnuPG setup
|
|
|
|
cp contrib/gpg.rc $out/etc/gpg.rc
|
|
|
|
sed -i 's#\(command="\)gpg #\1${gnupg}/bin/gpg #' $out/etc/gpg.rc
|
|
|
|
echo "source $out/etc/gpg.rc" >> $out/etc/Muttrc
|
|
|
|
'';
|
|
|
|
|
2016-07-09 03:13:52 +00:00
|
|
|
meta = {
|
2013-12-01 11:35:22 +00:00
|
|
|
description = "A small but very powerful text-based mail client";
|
2008-01-30 19:49:42 +00:00
|
|
|
homepage = http://www.mutt.org;
|
2016-07-09 03:13:52 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2013-12-01 11:35:22 +00:00
|
|
|
platforms = platforms.unix;
|
2016-07-09 03:13:52 +00:00
|
|
|
maintainers = with maintainers; [ the-kenny rnhmjoj ];
|
2008-01-30 19:49:42 +00:00
|
|
|
};
|
2007-08-05 18:23:53 +00:00
|
|
|
}
|