diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/applications/networking/mailreaders/mutt | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/mailreaders/mutt')
-rw-r--r-- | nixpkgs/pkgs/applications/networking/mailreaders/mutt/default.nix | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/mutt/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/mutt/default.nix new file mode 100644 index 000000000000..6d03f2276d0e --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/mailreaders/mutt/default.nix @@ -0,0 +1,96 @@ +{ stdenv, fetchurl, fetchpatch, ncurses, which, perl +, gdbm ? null +, openssl ? null +, cyrus_sasl ? null +, gnupg ? null +, gpgme ? null +, kerberos ? null +, headerCache ? true +, sslSupport ? true +, saslSupport ? true +, smimeSupport ? false +, gpgSupport ? false +, gpgmeSupport ? true +, imapSupport ? true +, withSidebar ? true +, gssSupport ? true +}: + +assert headerCache -> gdbm != null; +assert sslSupport -> openssl != null; +assert saslSupport -> cyrus_sasl != null; +assert smimeSupport -> openssl != null; +assert gpgSupport -> gnupg != null; +assert gpgmeSupport -> gpgme != null && openssl != null; + +with stdenv.lib; + +stdenv.mkDerivation rec { + name = "mutt-${version}"; + version = "1.11.1"; + + src = fetchurl { + url = "http://ftp.mutt.org/pub/mutt/${name}.tar.gz"; + sha256 = "01fvn5h7l9rkwx6qz46svl4hmww108v4bmcywiw3prb26q0l2lbh"; + }; + + patches = optional smimeSupport (fetchpatch { + url = "https://salsa.debian.org/mutt-team/mutt/raw/debian/1.11.1-2/debian/patches/misc/smime.rc.patch"; + sha256 = "1rl27qqwl4nw321ll5jcvfmkmz4fkvcsh5vihjcrhzzyf6vz8wmj"; + }); + + buildInputs = + [ ncurses which perl ] + ++ optional headerCache gdbm + ++ optional sslSupport openssl + ++ optional gssSupport kerberos + ++ optional saslSupport cyrus_sasl + ++ optional gpgmeSupport gpgme; + + configureFlags = [ + (enableFeature headerCache "hcache") + (enableFeature gpgmeSupport "gpgme") + (enableFeature imapSupport "imap") + (enableFeature withSidebar "sidebar") + "--enable-smtp" + "--enable-pop" + "--with-mailpath=" + + # Look in $PATH at runtime, instead of hardcoding /usr/bin/sendmail + "ac_cv_path_SENDMAIL=sendmail" + + # This allows calls with "-d N", that output debug info into ~/.muttdebug* + "--enable-debug" + + # 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" + ] ++ optional sslSupport "--with-ssl" + ++ optional gssSupport "--with-gss" + ++ optional saslSupport "--with-sasl"; + + 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 + ''; + + meta = { + description = "A small but very powerful text-based mail client"; + homepage = http://www.mutt.org; + license = licenses.gpl2Plus; + platforms = platforms.unix; + maintainers = with maintainers; [ the-kenny rnhmjoj ]; + }; +} |