2014-11-19 15:02:41 +00:00
|
|
|
{ stdenv, fetchurl, ncurses, which, perl, autoreconfHook
|
2007-08-06 13:18:55 +01:00
|
|
|
, sslSupport ? true
|
|
|
|
, imapSupport ? true
|
2008-05-13 20:21:09 +01:00
|
|
|
, headerCache ? true
|
2010-04-12 23:21:01 +01:00
|
|
|
, saslSupport ? true
|
2011-10-25 18:46:26 +01:00
|
|
|
, gpgmeSupport ? true
|
2008-05-13 20:21:09 +01:00
|
|
|
, gdbm ? null
|
2007-08-06 13:18:55 +01:00
|
|
|
, openssl ? null
|
2010-04-12 23:21:01 +01:00
|
|
|
, cyrus_sasl ? null
|
2011-10-25 18:46:26 +01:00
|
|
|
, gpgme ? null
|
2014-11-09 14:55:19 +00:00
|
|
|
, withSidebar ? false
|
2007-08-06 13:18:55 +01:00
|
|
|
}:
|
|
|
|
|
2008-05-13 20:21:09 +01:00
|
|
|
assert headerCache -> gdbm != null;
|
2007-08-06 13:18:55 +01:00
|
|
|
assert sslSupport -> openssl != null;
|
2010-04-12 23:21:01 +01:00
|
|
|
assert saslSupport -> cyrus_sasl != null;
|
2014-11-19 15:02:41 +00:00
|
|
|
assert gpgmeSupport -> gpgme != null;
|
2007-08-05 19:23:53 +01:00
|
|
|
|
2012-11-14 21:50:22 +00:00
|
|
|
let
|
2016-04-04 23:58:45 +01:00
|
|
|
version = "1.6.0";
|
2012-11-14 21:50:22 +00:00
|
|
|
in
|
2011-08-09 21:21:05 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2014-11-09 14:55:19 +00:00
|
|
|
name = "mutt${stdenv.lib.optionalString withSidebar "-with-sidebar"}-${version}";
|
|
|
|
|
2007-08-05 19:23:53 +01:00
|
|
|
src = fetchurl {
|
2015-09-28 23:23:55 +01:00
|
|
|
url = "http://ftp.mutt.org/pub/mutt/mutt-${version}.tar.gz";
|
2016-04-04 23:58:45 +01:00
|
|
|
sha256 = "06bc2drbgalkk68rzg7hq2v5m5qgjxff5357wg0419dpi8ivdbr9";
|
2007-08-05 19:23:53 +01:00
|
|
|
};
|
2010-07-24 09:50:30 +01:00
|
|
|
|
2014-11-19 15:02:41 +00:00
|
|
|
buildInputs = with stdenv.lib;
|
|
|
|
[ ncurses which perl ]
|
|
|
|
++ optional headerCache gdbm
|
|
|
|
++ optional sslSupport openssl
|
|
|
|
++ optional saslSupport cyrus_sasl
|
|
|
|
++ optional gpgmeSupport gpgme;
|
|
|
|
|
|
|
|
nativeBuildInputs = stdenv.lib.optional withSidebar autoreconfHook;
|
2014-11-09 14:55:19 +00:00
|
|
|
|
2007-08-06 13:18:55 +01:00
|
|
|
configureFlags = [
|
2010-04-12 23:10:15 +01:00
|
|
|
"--with-mailpath=" "--enable-smtp"
|
2010-09-06 08:17:20 +01:00
|
|
|
|
2015-04-11 23:31:08 +01:00
|
|
|
# Look in $PATH at runtime, instead of hardcoding /usr/bin/sendmail
|
|
|
|
"ac_cv_path_SENDMAIL=sendmail"
|
|
|
|
|
2010-09-06 08:17:20 +01:00
|
|
|
# This allows calls with "-d N", that output debug info into ~/.muttdebug*
|
2011-10-25 18:46:26 +01:00
|
|
|
"--enable-debug"
|
|
|
|
|
|
|
|
"--enable-pop" "--enable-imap"
|
2010-09-06 08:17:20 +01:00
|
|
|
|
2010-04-12 23:10:15 +01: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"
|
2008-05-13 20:21:09 +01:00
|
|
|
(if headerCache then "--enable-hcache" else "--disable-hcache")
|
2007-08-06 13:18:55 +01:00
|
|
|
(if sslSupport then "--with-ssl" else "--without-ssl")
|
|
|
|
(if imapSupport then "--enable-imap" else "--disable-imap")
|
2010-09-06 08:17:20 +01:00
|
|
|
(if saslSupport then "--with-sasl" else "--without-sasl")
|
2011-10-25 18:46:26 +01:00
|
|
|
(if gpgmeSupport then "--enable-gpgme" else "--disable-gpgme")
|
2007-08-06 13:18:55 +01:00
|
|
|
];
|
2008-01-30 19:49:42 +00:00
|
|
|
|
2014-11-09 14:55:19 +00:00
|
|
|
# Adding the sidebar
|
2015-09-28 23:23:55 +01:00
|
|
|
patches = stdenv.lib.optional withSidebar [
|
|
|
|
./trash-folder.patch
|
|
|
|
./sidebar.patch
|
|
|
|
./sidebar-dotpathsep.patch
|
|
|
|
./sidebar-utf8.patch
|
|
|
|
./sidebar-newonly.patch
|
|
|
|
./sidebar-delimnullwide.patch
|
|
|
|
./sidebar-compose.patch
|
|
|
|
./sidebar-new.patch
|
|
|
|
];
|
2014-11-09 14:55:19 +00:00
|
|
|
|
2013-12-01 11:35:22 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A small but very powerful text-based mail client";
|
2008-01-30 19:49:42 +00:00
|
|
|
homepage = http://www.mutt.org;
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2013-12-01 11:35:22 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ the-kenny ];
|
2008-01-30 19:49:42 +00:00
|
|
|
};
|
2007-08-05 19:23:53 +01:00
|
|
|
}
|