about summary refs log tree commit diff
path: root/pkgs/applications/networking/mailreaders
diff options
context:
space:
mode:
author_1126 <mail@elfsechsundzwanzig.de>2014-07-02 17:08:45 +0200
committer_1126 <mail@elfsechsundzwanzig.de>2014-07-02 17:08:45 +0200
commit6a7d60c01a22e83d625506b7cc9243b8da41656a (patch)
tree76fdd0b100f7d6ccdb5ebc38ecf7160d374eece0 /pkgs/applications/networking/mailreaders
parent7e2012487584831e467019d99a111bfe0e78916a (diff)
downloadnixlib-6a7d60c01a22e83d625506b7cc9243b8da41656a.tar
nixlib-6a7d60c01a22e83d625506b7cc9243b8da41656a.tar.gz
nixlib-6a7d60c01a22e83d625506b7cc9243b8da41656a.tar.bz2
nixlib-6a7d60c01a22e83d625506b7cc9243b8da41656a.tar.lz
nixlib-6a7d60c01a22e83d625506b7cc9243b8da41656a.tar.xz
nixlib-6a7d60c01a22e83d625506b7cc9243b8da41656a.tar.zst
nixlib-6a7d60c01a22e83d625506b7cc9243b8da41656a.zip
mutt: update to 1.5.23
This commit rewrites the expression somewhat:

- it tries to simplify the expression.
- it changes from fetchurl to fetchhg.
- a patch to configure.ac is added in order to enable configuring the
  source on NixOS.
Diffstat (limited to 'pkgs/applications/networking/mailreaders')
-rw-r--r--pkgs/applications/networking/mailreaders/mutt/default.nix76
1 files changed, 35 insertions, 41 deletions
diff --git a/pkgs/applications/networking/mailreaders/mutt/default.nix b/pkgs/applications/networking/mailreaders/mutt/default.nix
index dbd5a41afd34..1cb7f298e206 100644
--- a/pkgs/applications/networking/mailreaders/mutt/default.nix
+++ b/pkgs/applications/networking/mailreaders/mutt/default.nix
@@ -1,63 +1,57 @@
-{ stdenv, fetchurl, ncurses, which, perl
-, sslSupport ? true
-, imapSupport ? true
-, headerCache ? true
-, saslSupport ? true
-, gpgmeSupport ? true
-, gdbm ? null
-, openssl ? null
-, cyrus_sasl ? null
-, gpgme ? null
-}:
-
-assert headerCache -> gdbm != null;
-assert sslSupport -> openssl != null;
-assert saslSupport -> cyrus_sasl != null;
+{ stdenv, fetchhg, autoconf, automake, ncurses, which
+, perl, gdbm, openssl, cyrus_sasl, gpgme, libidn }:
 
 let
-  version = "1.5.23";
+  version = "1.5.23-rel";
 in
 stdenv.mkDerivation rec {
   name = "mutt-${version}";
   
-  src = fetchurl {
-    url = "mirror://sourceforge/mutt/${name}.tar.gz";
-    sha256 = "0dzx4qk50pjfsb6cs5jahng96a52k12f7pm0sc78iqdrawg71w1s";
+  src = fetchhg {
+    url = "http://dev.mutt.org/hg/mutt/";
+    rev = "mutt-${version}";
+    sha256 =  "1m0aif066lsc0936ha9s1kfx63wsl1l1wiib7ax6xgzijawd80pp";
   };
 
+  enableParallelBuilding = true;
+
   buildInputs = [
-    ncurses which perl
-    (if headerCache then gdbm else null)
-    (if sslSupport then openssl else null)
-    (if saslSupport then cyrus_sasl else null)
-    (if gpgmeSupport then gpgme else null)
+    autoconf automake ncurses which perl
+    gdbm openssl cyrus_sasl gpgme libidn
   ];
-  
+
+  # This patch is necessary, because during the configure phase mutt
+  # searches for some paths to store mail in that do not exist on
+  # NixOS, like /var/mail, /usr/mail and similiar. This patch adds
+  # /tmp to the list.
+  patches = [
+    ./mailpath.patch
+  ];
+
+  preConfigure = ''./prepare'';
+
   configureFlags = [
-    "--with-mailpath=" "--enable-smtp"
+    "--prefix=$out"
 
-    # This allows calls with "-d N", that output debug info into ~/.muttdebug*
     "--enable-debug"
-
-    "--enable-pop" "--enable-imap"
-
-    # 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"
-    (if headerCache then "--enable-hcache" else "--disable-hcache")
-    (if sslSupport then "--with-ssl" else "--without-ssl")
-    (if imapSupport then "--enable-imap" else "--disable-imap")
-    (if saslSupport then "--with-sasl" else "--without-sasl")
-    (if gpgmeSupport then "--enable-gpgme" else "--disable-gpgme")
+    "--enable-gpgme"
+    "--enable-hcache"
+    "--enable-imap"
+    "--enable-pop"
+    "--enable-smtp"
+
+    "--with-idn"
+    "--with-regex"
+    "--with-ssl"
+    "--with-sasl"
   ];
-
+   
   meta = with stdenv.lib; {
     description = "A small but very powerful text-based mail client";
     homepage = http://www.mutt.org;
     license = "GPLv2+";
     platforms = platforms.unix;
-    maintainers = with maintainers; [ the-kenny ];
+    maintainers = with maintainers; [ the-kenny _1126 ];
   };
 }