about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/mailreaders
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/mailreaders')
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/afew/default.nix38
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/alpine/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/astroid/default.nix48
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/balsa/default.nix62
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/claws-mail/default.nix116
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/claws-mail/mime.patch28
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/imapfilter.nix24
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/inboxer/default.nix87
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/lumail/default.nix81
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/mailcheck/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/mailcheck/mailcheck-Makefile.patch22
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/mailnag/default.nix49
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/mailpile/default.nix52
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/mblaze/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/msgviewer/default.nix38
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/mutt/default.nix96
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/neomutt/default.nix98
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/notbit/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/notmuch-addrlookup/default.nix28
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/notmuch-bower/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/notmuch/default.nix89
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/notmuch/muchsync.nix23
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/notmuch/mutt.nix46
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/nylas-mail-bin/default.nix133
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/realpine/default.nix42
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/sup/.bundix/cache4
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/sup/Gemfile9
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/sup/Gemfile.lock41
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/sup/default.nix23
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/sup/gemset.nix126
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/sylpheed/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix179
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/thunderbird-bin/release_sources.nix585
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/thunderbird/default.nix198
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/thunderbird/no-buildconfig.patch23
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/trojita/default.nix37
36 files changed, 2615 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/afew/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/afew/default.nix
new file mode 100644
index 000000000000..bdf39de0651c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/afew/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, pythonPackages, notmuch }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "afew";
+  version = "1.3.0";
+
+  src = pythonPackages.fetchPypi {
+    inherit pname version;
+    sha256 = "0105glmlkpkjqbz350dxxasvlfx9dk0him9vwbl86andzi106ygz";
+  };
+
+  nativeBuildInputs = with pythonPackages; [ sphinx setuptools_scm ];
+
+  propagatedBuildInputs = with pythonPackages; [
+    pythonPackages.notmuch chardet dkimpy
+  ] ++ stdenv.lib.optional (!pythonPackages.isPy3k) subprocess32;
+
+  postBuild =  ''
+    make -C docs man
+  '';
+
+  postInstall = ''
+    mandir="$out/share/man/man1"
+    mkdir -p "$mandir"
+    cp docs/build/man/* "$mandir"
+  '';
+
+  makeWrapperArgs = [
+    ''--prefix PATH ':' "${notmuch}/bin"''
+  ];
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/afewmail/afew;
+    description = "An initial tagging script for notmuch mail";
+    license = licenses.isc;
+    maintainers = with maintainers; [ garbas andir flokli ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/alpine/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/alpine/default.nix
new file mode 100644
index 000000000000..bb62014c77a4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/alpine/default.nix
@@ -0,0 +1,33 @@
+{stdenv, fetchurl, ncurses, tcl, openssl, pam, kerberos
+, openldap
+}:
+
+# NOTE: Please check if any changes here are applicable to ../realpine/ as well
+stdenv.mkDerivation rec {
+  name = "alpine-${version}";
+  version = "2.21";
+
+  src = fetchurl {
+    url = "http://alpine.freeiz.com/alpine/release/src/${name}.tar.xz";
+    sha256 = "0f3llxrmaxw7w9w6aixh752md3cdc91mwfmbarkm8s413f4bcc30";
+  };
+
+  buildInputs = [
+    ncurses tcl openssl pam kerberos openldap
+  ];
+
+  hardeningDisable = [ "format" ];
+
+  configureFlags = [
+    "--with-ssl-include-dir=${openssl.dev}/include/openssl"
+    "--with-passfile=.pine-passfile"
+  ];
+
+  meta = {
+    description = "Console mail reader";
+    license = stdenv.lib.licenses.asl20;
+    maintainers = [stdenv.lib.maintainers.raskin];
+    platforms = stdenv.lib.platforms.linux;
+    homepage = https://www.washington.edu/alpine/;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/astroid/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/astroid/default.nix
new file mode 100644
index 000000000000..41f3a271a699
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/astroid/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchFromGitHub, cmake, pkgconfig, gnome3, gmime3, webkitgtk
+, libsass, notmuch, boost, wrapGAppsHook, glib-networking, protobuf, vim_configurable
+, gtkmm3, libpeas, gsettings-desktop-schemas
+, makeWrapper, python3, python3Packages
+, vim ? vim_configurable.override {
+                    features = "normal";
+                    gui = "auto";
+                  }
+, ronn
+}:
+
+stdenv.mkDerivation rec {
+  name = "astroid-${version}";
+  version = "0.14";
+
+  src = fetchFromGitHub {
+    owner = "astroidmail";
+    repo = "astroid";
+    rev = "v${version}";
+    sha256 = "1wkv1icsx3g3gq485dnvcdhr9srrjgz4ws1i1krcw9n61bj7gxh8";
+  };
+
+  nativeBuildInputs = [ cmake ronn pkgconfig wrapGAppsHook ];
+
+  buildInputs = [
+    gtkmm3 gmime3 webkitgtk libsass libpeas
+    python3 python3Packages.pygobject3
+    notmuch boost gsettings-desktop-schemas gnome3.adwaita-icon-theme
+    glib-networking protobuf
+   ] ++ (if vim == null then [] else [ vim ]);
+
+  postPatch = ''
+    sed -i "s~gvim ~${vim}/bin/vim -g ~g" src/config.cc
+    sed -i "s~ -geom 10x10~~g" src/config.cc
+  '';
+
+  postInstall = ''
+    wrapProgram "$out/bin/astroid" --set CHARSET=en_us.UTF-8
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://astroidmail.github.io/;
+    description = "GTK+ frontend to the notmuch mail system";
+    maintainers = with maintainers; [ bdimcheff SuprDewd ];
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/balsa/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/balsa/default.nix
new file mode 100644
index 000000000000..f7f34a671837
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/balsa/default.nix
@@ -0,0 +1,62 @@
+{ stdenv, fetchurl, pkgconfig, intltool, glib, gtk3, gmime, gnutls,
+  webkitgtk, libesmtp, openssl, libnotify, gtkspell3, gpgme,
+  libcanberra-gtk3, libsecret, gtksourceview, gobject-introspection,
+  hicolor-icon-theme, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  name = "balsa-${version}";
+  version = "2.5.6";
+
+  src = fetchurl {
+    url = "https://pawsa.fedorapeople.org/balsa/${name}.tar.bz2";
+    sha256 = "17k6wcsl8gki7cskr3hhmfj6n54rha8ca3b6fzd8blsl5shsankx";
+  };
+
+  nativeBuildInputs = [
+    pkgconfig
+    intltool
+    gobject-introspection
+    hicolor-icon-theme
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    glib
+    gtk3
+    gmime
+    gnutls
+    webkitgtk
+    openssl
+    libnotify
+    gtkspell3
+    gpgme
+    libcanberra-gtk3
+    gtksourceview
+    libsecret
+    libesmtp
+  ];
+
+  configureFlags = [
+    "--with-canberra"
+    "--with-gpgme"
+    "--with-gtksourceview"
+    "--with-libsecret"
+    "--with-ssl"
+    "--with-unique"
+    "--without-gnome"
+    "--with-spell-checker=gtkspell"
+  ];
+
+  NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = http://pawsa.fedorapeople.org/balsa/;
+    description = "An e-mail client for GNOME";
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.romildo ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/claws-mail/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/claws-mail/default.nix
new file mode 100644
index 000000000000..42f29574eef3
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/claws-mail/default.nix
@@ -0,0 +1,116 @@
+{ config, fetchurl, stdenv, wrapGAppsHook, autoreconfHook
+, curl, dbus, dbus-glib, enchant, gtk2, gnutls, gnupg, gpgme, hicolor-icon-theme
+, libarchive, libcanberra-gtk2, libetpan, libnotify, libsoup, libxml2, networkmanager
+, openldap, perl, pkgconfig, poppler, python, shared-mime-info, webkitgtk24x-gtk2
+, glib-networking, gsettings-desktop-schemas, libSM, libytnef, libical 
+# Build options
+# TODO: A flag to build the manual.
+# TODO: Plugins that complain about their missing dependencies, even when
+#       provided:
+#         gdata requires libgdata
+#         geolocation requires libchamplain
+, enableLdap ? false
+, enableNetworkManager ? config.networking.networkmanager.enable or false
+, enablePgp ? true
+, enablePluginArchive ? false
+, enablePluginFancy ? false
+, enablePluginNotificationDialogs ? true
+, enablePluginNotificationSounds ? true
+, enablePluginPdf ? false
+, enablePluginPython ? false
+, enablePluginRavatar ? false
+, enablePluginRssyl ? false
+, enablePluginSmime ? false
+, enablePluginSpamassassin ? false
+, enablePluginSpamReport ? false
+, enablePluginVcalendar ? false
+, enableSpellcheck ? false
+}:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  name = "claws-mail-${version}";
+  version = "3.17.3";
+
+  src = fetchurl {
+    url = "http://www.claws-mail.org/download.php?file=releases/claws-mail-${version}.tar.xz";
+    sha256 = "1wnj6c9cbmhphs2l6wfvndkk2g08rmxw0sl2c8k1k008dxd1ykjh";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  patches = [ ./mime.patch ];
+
+  preConfigure = ''
+    # autotools check tries to dlopen libpython as a requirement for the python plugin
+    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${python}/lib
+  '';
+
+  postPatch = ''
+    substituteInPlace src/procmime.c \
+        --subst-var-by MIMEROOTDIR ${shared-mime-info}/share
+  '';
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig wrapGAppsHook python.pkgs.wrapPython ];
+  propagatedBuildInputs = with python.pkgs; [ python ] ++ optionals enablePluginPython [ pygtk pygobject2 ];
+
+  buildInputs =
+    [ curl dbus dbus-glib gtk2 gnutls gsettings-desktop-schemas hicolor-icon-theme
+      libetpan perl glib-networking libSM libytnef
+    ]
+    ++ optional enableSpellcheck enchant
+    ++ optionals (enablePgp || enablePluginSmime) [ gnupg gpgme ]
+    ++ optional enablePluginArchive libarchive
+    ++ optional enablePluginNotificationSounds libcanberra-gtk2
+    ++ optional enablePluginNotificationDialogs libnotify
+    ++ optional enablePluginFancy libsoup
+    ++ optional enablePluginRssyl libxml2
+    ++ optional enableNetworkManager networkmanager
+    ++ optional enableLdap openldap
+    ++ optional enablePluginPdf poppler
+    ++ optional enablePluginFancy webkitgtk24x-gtk2
+    ++ optional enablePluginVcalendar libical;
+
+  configureFlags =
+    optional (!enableLdap) "--disable-ldap"
+    ++ optional (!enableNetworkManager) "--disable-networkmanager"
+    ++ optionals (!enablePgp) [
+      "--disable-pgpcore-plugin"
+      "--disable-pgpinline-plugin"
+      "--disable-pgpmime-plugin"
+    ]
+    ++ optional (!enablePluginArchive) "--disable-archive-plugin"
+    ++ optional (!enablePluginFancy) "--disable-fancy-plugin"
+    ++ optional (!enablePluginPdf) "--disable-pdf_viewer-plugin"
+    ++ optional (!enablePluginPython) "--disable-python-plugin"
+    ++ optional (!enablePluginRavatar) "--disable-libravatar-plugin"
+    ++ optional (!enablePluginRssyl) "--disable-rssyl-plugin"
+    ++ optional (!enablePluginSmime) "--disable-smime-plugin"
+    ++ optional (!enablePluginSpamassassin) "--disable-spamassassin-plugin"
+    ++ optional (!enablePluginSpamReport) "--disable-spam_report-plugin"
+    ++ optional (!enablePluginVcalendar) "--disable-vcalendar-plugin"
+    ++ optional (!enableSpellcheck) "--disable-enchant";
+
+  enableParallelBuilding = true;
+
+  pythonPath = with python.pkgs; [ pygobject2 pygtk ];
+
+  preFixup = ''
+    buildPythonPath "$out $pythonPath"
+    gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "${shared-mime-info}/share" --prefix PYTHONPATH : "$program_PYTHONPATH")
+  '';
+
+  postInstall = ''
+    mkdir -p $out/share/applications
+    cp claws-mail.desktop $out/share/applications
+  '';
+
+  meta = {
+    description = "The user-friendly, lightweight, and fast email client";
+    homepage = https://www.claws-mail.org/;
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ fpletz globin ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/claws-mail/mime.patch b/nixpkgs/pkgs/applications/networking/mailreaders/claws-mail/mime.patch
new file mode 100644
index 000000000000..2ff4269c3329
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/claws-mail/mime.patch
@@ -0,0 +1,28 @@
+diff --git a/src/procmime.c b/src/procmime.c
+index bd3239e..06a3b26 100644
+--- a/src/procmime.c
++++ b/src/procmime.c
+@@ -1144,20 +1144,16 @@ GList *procmime_get_mime_type_list(void)
+ 	MimeType *mime_type;
+ 	gboolean fp_is_glob_file = TRUE;
+ 
+ 	if (mime_type_list) 
+ 		return mime_type_list;
+-	
+-#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
+-	if ((fp = claws_fopen(DATAROOTDIR "/mime/globs", "rb")) == NULL) 
+-#else
+-	if ((fp = claws_fopen("/usr/share/mime/globs", "rb")) == NULL) 
+-#endif
++
++	if ((fp = claws_fopen("@MIMEROOTDIR@/mime/globs", "rb")) == NULL)
+ 	{
+ 		fp_is_glob_file = FALSE;
+ 		if ((fp = claws_fopen("/etc/mime.types", "rb")) == NULL) {
+ 			if ((fp = claws_fopen(SYSCONFDIR "/mime.types", "rb")) 
+ 				== NULL) {
+ 				FILE_OP_ERROR(SYSCONFDIR "/mime.types", 
+ 					"claws_fopen");
+ 				return NULL;
+ 			}
+
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/imapfilter.nix b/nixpkgs/pkgs/applications/networking/mailreaders/imapfilter.nix
new file mode 100644
index 000000000000..e5a919af2e6f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/imapfilter.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchFromGitHub, openssl, lua, pcre }:
+
+stdenv.mkDerivation rec {
+  name = "imapfilter-${version}";
+  version = "2.6.12";
+
+  src = fetchFromGitHub {
+    owner = "lefcha";
+    repo = "imapfilter";
+    rev = "v${version}";
+    sha256 = "0vzpc54fjf5vb5vx5w0fl20xvx1k9cg6a3hbl86mm8kwsqf3wrab";
+  };
+
+  makeFlagsArray = "PREFIX=$(out)";
+  propagatedBuildInputs = [ openssl pcre lua ];
+
+  meta = {
+    homepage = https://github.com/lefcha/imapfilter;
+    description = "Mail filtering utility";
+    license = stdenv.lib.licenses.mit;
+    platforms = stdenv.lib.platforms.unix;
+    maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/inboxer/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/inboxer/default.nix
new file mode 100644
index 000000000000..72b9ce09d76d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/inboxer/default.nix
@@ -0,0 +1,87 @@
+{ stdenv, fetchurl, binutils, patchelf, makeWrapper
+, expat, xorg, gdk_pixbuf, glib, gnome2, cairo, atk, freetype
+, fontconfig, dbus, nss, nspr, gtk2-x11, alsaLib, cups, libpulseaudio, udev }:
+
+stdenv.mkDerivation rec {
+  name = "inboxer-${version}";
+  version = "1.2.1";
+
+  meta = with stdenv.lib; {
+    description = "Unofficial, free and open-source Google Inbox Desktop App";
+    homepage    = "https://denysdovhan.com/inboxer";
+    maintainers = [ maintainers.mgttlinger ];
+    license     = licenses.mit;
+    platforms   = [ "x86_64-linux" ];
+  };
+
+  src = fetchurl {
+    url = "https://github.com/denysdovhan/inboxer/releases/download/v${version}/inboxer_${version}_amd64.deb";
+    sha256 = "0nyxas07d6ckgjazxapmc6iyakd2cddla6wflr5rhfp78d7kax3a";
+  };
+
+  unpackPhase = ''
+    ar p $src data.tar.xz | tar xJ
+  '';
+  nativeBuildInputs = [ patchelf makeWrapper ];
+  buildInputs = [ binutils ];
+
+  preFixup = with stdenv.lib; let
+    lpath = makeLibraryPath [
+      alsaLib
+      atk
+      cairo
+      cups
+      dbus
+      nss
+      nspr
+      freetype
+      fontconfig
+      gtk2-x11
+      xorg.libX11
+      xorg.libXcursor
+      xorg.libXdamage
+      xorg.libXi
+      xorg.libXext
+      xorg.libXfixes
+      xorg.libXrandr
+      xorg.libXrender
+      xorg.libXcomposite
+      xorg.libXtst
+      xorg.libXScrnSaver
+      xorg.libxcb
+      gdk_pixbuf
+      glib
+      gnome2.pango
+      gnome2.GConf
+      expat
+      stdenv.cc.cc.lib
+      libpulseaudio
+      udev
+    ];
+  in ''
+    patchelf \
+      --set-rpath "$out/opt/Inboxer:${lpath}" \
+      $out/opt/Inboxer/libnode.so
+    patchelf \
+      --set-rpath "$out/opt/Inboxer:${lpath}" \
+      $out/opt/Inboxer/libffmpeg.so
+
+    patchelf \
+      --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+      --set-rpath "$out/opt/Inboxer:${lpath}" \
+      $out/opt/Inboxer/inboxer
+
+    wrapProgram $out/opt/Inboxer/inboxer --set LD_LIBRARY_PATH "${xorg.libxkbfile}/lib:${lpath}"
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp -R usr/share opt $out/
+    # fix the path in the desktop file
+    substituteInPlace \
+      $out/share/applications/inboxer.desktop \
+      --replace /opt/ $out/opt/
+    # symlink the binary to bin/
+    ln -s $out/opt/Inboxer/inboxer $out/bin/inboxer
+  '';
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/lumail/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/lumail/default.nix
new file mode 100644
index 000000000000..79deab46912b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/lumail/default.nix
@@ -0,0 +1,81 @@
+{ stdenv, fetchurl, pkgconfig, lua, file, ncurses, gmime, pcre-cpp
+, perl, perlPackages, makeWrapper
+, debugBuild ? false
+, alternativeGlobalConfigFilePath ? null
+}:
+
+let
+  version    = "3.1";
+  binaryName = if debugBuild then "lumail2-debug" else "lumail2";
+  alternativeConfig = builtins.toFile "lumail2.lua"
+    (builtins.readFile alternativeGlobalConfigFilePath);
+
+  globalConfig = if isNull alternativeGlobalConfigFilePath then ''
+    mkdir -p $out/etc/lumail2
+    cp global.config.lua $out/etc/lumail2.lua
+    for n in ./lib/*.lua; do
+      cp "$n" $out/etc/lumail2/
+    done
+  '' else ''
+    ln -s ${alternativeConfig} $out/etc/lumail2.lua
+  '';
+
+  getPath  = type : "${lua}/lib/?.${type};";
+  luaPath  = getPath "lua";
+  luaCPath = getPath "so";
+in
+stdenv.mkDerivation {
+  name = "lumail-${version}";
+
+  src = fetchurl {
+    url = "https://lumail.org/download/lumail-${version}.tar.gz";
+    sha256 = "0vj7p7f02m3w8wb74ilajcwznc4ai4h2ikkz9ildy0c00aqsi5w4";
+  };
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ pkgconfig makeWrapper ];
+  buildInputs = [
+    lua file ncurses gmime pcre-cpp
+    perl perlPackages.JSON perlPackages.NetIMAPClient
+  ];
+
+  preConfigure = ''
+    sed -e 's|"/etc/lumail2|LUMAIL_LUAPATH"/..|' -i src/lumail2.cc src/imap_proxy.cc
+
+    perlFlags=
+    for i in $(IFS=:; echo $PERL5LIB); do
+        perlFlags="$perlFlags -I$i"
+    done
+
+    sed -e "s|^#\!\(.*/perl.*\)$|#\!\1$perlFlags|" -i perl.d/imap-proxy
+  '';
+
+  buildFlags = if debugBuild then "lumail2-debug" else "";
+
+  installPhase = ''
+    mkdir -p $out/bin || true
+    install -m755 ${binaryName} $out/bin/
+  ''
+  + globalConfig
+  + ''
+    wrapProgram $out/bin/${binaryName} \
+        --prefix LUA_PATH : "${luaPath}" \
+        --prefix LUA_CPATH : "${luaCPath}"
+  '';
+
+  makeFlags = [
+    "LVER=lua"
+    "PREFIX=$(out)"
+    "SYSCONFDIR=$(out)/etc"
+    "LUMAIL_LIBS=$(out)/etc/lumail2"
+  ];
+
+  meta = with stdenv.lib; {
+    description = "Console-based email client";
+    homepage = https://lumail.org/;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [orivej];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/mailcheck/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/mailcheck/default.nix
new file mode 100644
index 000000000000..05e784856554
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/mailcheck/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "mailcheck-${version}";
+  version = "1.91.2";
+
+  patches = [ ./mailcheck-Makefile.patch ];
+
+  src = fetchurl {
+    url = "mirror://sourceforge/mailcheck/mailcheck_${version}.tar.gz";
+    sha256 = "0p0azaxsnjvjbg41ycicc1i0kzw6jiynq8k49cfkdhlckxfdm9kc";
+  };
+
+  meta = {
+    description = "Simple command line tool to check for new messages";
+    homepage    = http://mailcheck.sourceforge.net/;
+    license     = stdenv.lib.licenses.gpl2;
+    maintainers = with stdenv.lib.maintainers; [ kovirobi ];
+    platforms   = stdenv.lib.platforms.linux;
+    inherit version;
+
+    longDescription = ''
+      A simple command line tool to check for new mail in local mbox and
+      maildir and remote POP3 and IMAP mailboxes.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/mailcheck/mailcheck-Makefile.patch b/nixpkgs/pkgs/applications/networking/mailreaders/mailcheck/mailcheck-Makefile.patch
new file mode 100644
index 000000000000..46b3bff4f7a9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/mailcheck/mailcheck-Makefile.patch
@@ -0,0 +1,22 @@
+diff -u a/Makefile b/Makefile
+--- a/Makefile	2015-04-05 19:31:41.871227295 +0100
++++ b/Makefile	2015-04-05 19:42:49.743517508 +0100
+@@ -1,3 +1,5 @@
++prefix=$(out)
++
+ all: mailcheck
+ 
+ debug: mailcheck.c netrc.c netrc.h socket.c
+@@ -7,8 +9,10 @@
+ 	$(CC) -Wall -O2 mailcheck.c netrc.c socket.c -s -o mailcheck
+ 
+ install: mailcheck
+-	install mailcheck $(prefix)/usr/bin
+-	install -m 644 mailcheckrc $(prefix)/etc
++	[ -d $(prefix)/bin ] || mkdir $(prefix)/bin
++	[ -d $(prefix)/etc ] || mkdir $(prefix)/etc
++	install mailcheck $(prefix)/bin/
++	install -m 644 mailcheckrc $(prefix)/etc/
+ 
+ distclean: clean
+ 
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/mailnag/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/mailnag/default.nix
new file mode 100644
index 000000000000..8a16aeb55182
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/mailnag/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, fetchurl, gettext, gtk3, pythonPackages
+, gdk_pixbuf, libnotify, gst_all_1
+, libgnome-keyring3
+, wrapGAppsHook, gnome3
+# otherwise passwords are stored unencrypted
+, withGnomeKeyring ? true
+}:
+
+let
+  inherit (pythonPackages) python;
+in pythonPackages.buildPythonApplication rec {
+  name = "mailnag-${version}";
+  version = "1.2.1";
+
+  src = fetchurl {
+    url = "https://github.com/pulb/mailnag/archive/v${version}.tar.gz";
+    sha256 = "ec7ac027d93bc7d88fc270858f5a181453a6ff07f43cab20563d185818801fee";
+  };
+
+  buildInputs = [
+    gtk3 gdk_pixbuf libnotify gst_all_1.gstreamer
+    gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good
+    gst_all_1.gst-plugins-bad
+    gnome3.adwaita-icon-theme
+  ] ++ stdenv.lib.optional withGnomeKeyring libgnome-keyring3;
+
+  nativeBuildInputs = [
+    gettext
+    wrapGAppsHook
+  ];
+
+  propagatedBuildInputs = with pythonPackages; [
+    pygobject3 dbus-python pyxdg
+  ];
+
+  buildPhase = "";
+
+  installPhase = "${python}/bin/python setup.py install --prefix=$out";
+
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "An extensible mail notification daemon";
+    homepage = https://github.com/pulb/mailnag;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/mailpile/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/mailpile/default.nix
new file mode 100644
index 000000000000..0f11d9a6df05
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/mailpile/default.nix
@@ -0,0 +1,52 @@
+{ stdenv, fetchFromGitHub, python2Packages, gnupg1orig, openssl, git }:
+
+python2Packages.buildPythonApplication rec {
+  name = "mailpile-${version}";
+  version = "1.0.0rc2";
+
+  src = fetchFromGitHub {
+    owner = "mailpile";
+    repo = "Mailpile";
+    rev = "${version}";
+    sha256 = "1z5psh00fjr8gnl4yjcl4m9ywfj24y1ffa2rfb5q8hq4ksjblbdj";
+  };
+
+  postPatch = ''
+    patchShebangs scripts
+  '';
+
+  nativeBuildInputs = with python2Packages; [ pbr git ];
+  PBR_VERSION=version;
+
+  propagatedBuildInputs = with python2Packages; [
+    appdirs
+    cryptography
+    fasteners
+    gnupg1orig
+    jinja2
+    pgpdump
+    pillow
+    python2Packages.lxml
+    spambayes
+  ];
+
+  postInstall = ''
+    wrapProgram $out/bin/mailpile \
+      --prefix PATH ":" "${stdenv.lib.makeBinPath [ gnupg1orig openssl ]}" \
+      --set-default MAILPILE_SHARED "$out/share/mailpile"
+  '';
+
+  # No tests were found
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "A modern, fast web-mail client with user-friendly encryption and privacy features";
+    homepage = https://www.mailpile.is/;
+    license = [ licenses.asl20 licenses.agpl3 ];
+    platforms = platforms.linux;
+    maintainers = [ maintainers.domenkozar ];
+    knownVulnerabilities = [
+      "Numerous and uncounted, upstream has requested we not package it. See more: https://github.com/NixOS/nixpkgs/pull/23058#issuecomment-283515104"
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/mblaze/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/mblaze/default.nix
new file mode 100644
index 000000000000..6356fcfc2094
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/mblaze/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub, libiconv }:
+
+stdenv.mkDerivation rec {
+  name = "mblaze-${version}";
+  version = "0.5";
+
+  buildInputs = stdenv.lib.optionals stdenv.isDarwin [ libiconv ];
+
+  src = fetchFromGitHub {
+    owner = "chneukirchen";
+    repo = "mblaze";
+    rev = "v${version}";
+    sha256 = "0fyvydafpz7vmwgn7hc4drm9sb7367smrd07wfyizpas0gmxw2j8";
+  };
+
+  makeFlags = "PREFIX=$(out)";
+
+  postInstall = ''
+    install -Dm644 -t $out/share/zsh/site-functions contrib/_mblaze
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/chneukirchen/mblaze;
+    description = "Unix utilities to deal with Maildir";
+    license = licenses.cc0;
+    platforms = platforms.all;
+    maintainers = [ maintainers.ajgrf ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/msgviewer/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/msgviewer/default.nix
new file mode 100644
index 000000000000..88e573f6cf42
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/msgviewer/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchurl, makeWrapper, unzip, jre, runtimeShell }:
+
+let
+  version = "1.9";
+  name = "msgviewer-${version}";
+  uname = "MSGViewer-${version}";
+
+in stdenv.mkDerivation rec {
+  inherit name;
+
+  src = fetchurl {
+    url    = "mirror://sourceforge/msgviewer/${uname}/${uname}.zip";
+    sha256 = "0igmr8c0757xsc94xlv2470zv2mz57zaj52dwr9wj8agmj23jbjz";
+  };
+
+  buildCommand = ''
+    dir=$out/lib/msgviewer
+    mkdir -p $out/bin $dir
+    unzip $src -d $dir
+    mv $dir/${uname}/* $dir
+    rmdir $dir/${uname}
+    cat <<_EOF > $out/bin/msgviewer
+    #!${runtimeShell} -eu
+    exec ${stdenv.lib.getBin jre}/bin/java -jar $dir/MSGViewer.jar "\$@"
+    _EOF
+    chmod 755 $out/bin/msgviewer
+  '';
+
+  nativeBuildInputs = [ makeWrapper unzip ];
+
+  meta = with stdenv.lib; {
+    description = "Viewer for .msg files (MS Outlook)";
+    homepage    = https://www.washington.edu/alpine/;
+    license     = licenses.asl20;
+    maintainers = with maintainers; [ peterhoeg ];
+    platforms   = platforms.all;
+  };
+}
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..dde0d480391b
--- /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.3";
+
+  src = fetchurl {
+    url = "http://ftp.mutt.org/pub/mutt/${name}.tar.gz";
+    sha256 = "0h8rmcc62n1pagm7mjjccd5fxyhhi4vbvp8m88digkdf5z0g8hm5";
+  };
+
+  patches = optional smimeSupport (fetchpatch {
+    url = "https://salsa.debian.org/mutt-team/mutt/raw/debian/1.11.2-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 ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/neomutt/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/neomutt/default.nix
new file mode 100644
index 000000000000..0da451ed51e2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/neomutt/default.nix
@@ -0,0 +1,98 @@
+{ stdenv, fetchFromGitHub, gettext, makeWrapper, tcl, which, writeScript
+, ncurses, perl , cyrus_sasl, gss, gpgme, kerberos, libidn, libxml2, notmuch, openssl
+, lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42, mailcap, runtimeShell
+}:
+
+let
+  muttWrapper = writeScript "mutt" ''
+    #!${runtimeShell} -eu
+
+    echo 'The neomutt project has renamed the main binary from `mutt` to `neomutt`.'
+    echo ""
+    echo 'This wrapper is provided for compatibility purposes only. You should start calling `neomutt` instead.'
+    echo ""
+    read -p 'Press any key to launch NeoMutt...' -n1 -s
+    exec neomutt "$@"
+  '';
+
+in stdenv.mkDerivation rec {
+  version = "20180716";
+  name = "neomutt-${version}";
+
+  src = fetchFromGitHub {
+    owner  = "neomutt";
+    repo   = "neomutt";
+    rev    = "neomutt-${version}";
+    sha256 = "0im2kkahkr04q04irvcimfawxi531ld6wrsa92r2m7l10gmijkl8";
+  };
+
+  buildInputs = [
+    cyrus_sasl gss gpgme kerberos libidn ncurses
+    notmuch openssl perl lmdb
+    mailcap
+  ];
+
+  nativeBuildInputs = [
+    docbook_xsl docbook_xml_dtd_42 gettext libxml2 libxslt.bin makeWrapper tcl which
+  ];
+
+  enableParallelBuilding = true;
+
+  postPatch = ''
+    substituteInPlace contrib/smime_keys \
+      --replace /usr/bin/openssl ${openssl}/bin/openssl
+
+    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
+
+
+    # allow neomutt to map attachments to their proper mime.types if specified wrongly
+    # and use a far more comprehensive list than the one shipped with neomutt
+    substituteInPlace sendlib.c \
+      --replace /etc/mime.types ${mailcap}/etc/mime.types
+
+    # The string conversion tests all fail with the first version of neomutt
+    # that has tests (20180223) as well as 20180716 so we disable them for now.
+    # I don't know if that is related to the tests or our build environment.
+    # Try again with a later release.
+    sed -i '/rfc2047/d' test/Makefile.autosetup test/main.c
+  '';
+
+  configureFlags = [
+    "--gpgme"
+    "--gss"
+    "--lmdb"
+    "--notmuch"
+    "--ssl"
+    "--sasl"
+    "--with-homespool=mailbox"
+    "--with-mailpath="
+    # Look in $PATH at runtime, instead of hardcoding /usr/bin/sendmail
+    "ac_cv_path_SENDMAIL=sendmail"
+  ];
+
+  # Fix missing libidn in mutt;
+  # this fix is ugly since it links all binaries in mutt against libidn
+  # like pgpring, pgpewrap, ...
+  NIX_LDFLAGS = "-lidn";
+
+  postInstall = ''
+    cp ${muttWrapper} $out/bin/mutt
+    wrapProgram "$out/bin/neomutt" --prefix PATH : "$out/libexec/neomutt"
+  '';
+
+  doCheck = true;
+
+  checkTarget = "test";
+
+  meta = with stdenv.lib; {
+    description = "A small but very powerful text-based mail client";
+    homepage    = http://www.neomutt.org;
+    license     = licenses.gpl2Plus;
+    maintainers = with maintainers; [ cstrahan erikryb jfrankenau vrthra ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/notbit/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/notbit/default.nix
new file mode 100644
index 000000000000..3e235400498f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/notbit/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig,
+  gettext, openssl
+}:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  name = "notbit-${version}";
+  version = "2018-01-09";
+
+  src = fetchFromGitHub {
+    owner  = "bpeel";
+    repo   = "notbit";
+    rev    = "8b5d3d2da8ce54abae2536b4d97641d2c798cff3";
+    sha256 = "1623n0lvx42mamvb2vwin5i38hh0nxpxzmkr5188ss2x7m20lmii";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+
+  buildInputs = [ openssl gettext ];
+
+  meta = {
+    description = "A minimal Bitmessage client";
+    homepage = https://github.com/bpeel/notbit;
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ mog ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/notmuch-addrlookup/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/notmuch-addrlookup/default.nix
new file mode 100644
index 000000000000..c2cce227576a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/notmuch-addrlookup/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchFromGitHub, pkgconfig, glib, notmuch }:
+
+let
+  version = "9";
+in
+stdenv.mkDerivation rec {
+  name = "notmuch-addrlookup-${version}";
+
+  src = fetchFromGitHub {
+    owner = "aperezdc";
+    repo = "notmuch-addrlookup-c";
+    rev ="v${version}";
+    sha256 = "1j3zdx161i1x4w0nic14ix5i8hd501rb31daf8api0k8855sx4rc";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ glib notmuch ];
+
+  installPhase = "install -D notmuch-addrlookup $out/bin/notmuch-addrlookup";
+
+  meta = with stdenv.lib; {
+    description = "Address lookup tool for Notmuch in C";
+    homepage = https://github.com/aperezdc/notmuch-addrlookup-c;
+    maintainers = with maintainers; [ mog garbas ];
+    platforms = platforms.unix;
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/notmuch-bower/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/notmuch-bower/default.nix
new file mode 100644
index 000000000000..e2b56f3b8afd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/notmuch-bower/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchFromGitHub, gawk, mercury, pandoc, ncurses, gpgme }:
+
+stdenv.mkDerivation rec {
+  name = "notmuch-bower-${version}";
+  version = "0.10";
+
+  src = fetchFromGitHub {
+    owner = "wangp";
+    repo = "bower";
+    rev = version;
+    sha256 = "0jpaxlfxz7mj76z3cyj8sq053p0mkp46kaw05nimzwaq5yx923fv";
+  };
+
+  nativeBuildInputs = [ gawk mercury pandoc ];
+
+  buildInputs = [ ncurses gpgme ];
+
+  makeFlags = [ "PARALLEL=-j$(NIX_BUILD_CORES)" "bower" "man" ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mv bower $out/bin/
+    mkdir -p $out/share/man/man1
+    mv bower.1 $out/share/man/man1/
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/wangp/bower;
+    description = "A curses terminal client for the Notmuch email system";
+    maintainers = with maintainers; [ erictapen ];
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/notmuch/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/notmuch/default.nix
new file mode 100644
index 000000000000..305535029c28
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/notmuch/default.nix
@@ -0,0 +1,89 @@
+{ fetchurl, stdenv
+, pkgconfig, gnupg
+, xapian, gmime, talloc, zlib
+, doxygen, perl
+, pythonPackages
+, bash-completion
+, emacs
+, ruby
+, which, dtach, openssl, bash, gdb, man
+}:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  version = "0.28.3";
+  name = "notmuch-${version}";
+
+  passthru = {
+    pythonSourceRoot = "${name}/bindings/python";
+    inherit version;
+  };
+
+  src = fetchurl {
+    url = "https://notmuchmail.org/releases/${name}.tar.gz";
+    sha256 = "1v0ff6qqwj42p3n6qw30czzqi52nvgf3dn05vd7a03g39a5js8af";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [
+    gnupg # undefined dependencies
+    xapian gmime talloc zlib  # dependencies described in INSTALL
+    doxygen perl  # (optional) api docs
+    pythonPackages.sphinx pythonPackages.python  # (optional) documentation -> doc/INSTALL
+    bash-completion  # (optional) dependency to install bash completion
+    emacs  # (optional) to byte compile emacs code, also needed for tests
+    ruby  # (optional) ruby bindings
+  ];
+
+  postPatch = ''
+    patchShebangs configure
+    patchShebangs test/
+
+    for src in \
+      util/crypto.c \
+      notmuch-config.c
+    do
+      substituteInPlace "$src" \
+        --replace \"gpg\" \"${gnupg}/bin/gpg\"
+    done
+
+    substituteInPlace lib/Makefile.local \
+      --replace '-install_name $(libdir)' "-install_name $out/lib"
+  '';
+
+  configureFlags = [ "--zshcompletiondir=$(out)/share/zsh/site-functions" ];
+
+  # Notmuch doesn't use autoconf and consequently doesn't tag --bindir and
+  # friends
+  setOutputFlags = false;
+  enableParallelBuilding = true;
+  makeFlags = "V=1";
+
+  preCheck = let
+    test-database = fetchurl {
+      url = "https://notmuchmail.org/releases/test-databases/database-v1.tar.xz";
+      sha256 = "1lk91s00y4qy4pjh8638b5lfkgwyl282g1m27srsf7qfn58y16a2";
+    };
+  in ''
+    ln -s ${test-database} test/test-databases/database-v1.tar.xz
+  '';
+  doCheck = !stdenv.hostPlatform.isDarwin && (versionAtLeast gmime.version "3.0");
+  checkTarget = "test";
+  checkInputs = [
+    which dtach openssl bash
+    gdb man
+  ];
+
+  installTargets = "install install-man";
+
+  dontGzipMan = true; # already compressed
+
+  meta = {
+    description = "Mail indexer";
+    homepage    = https://notmuchmail.org/;
+    license     = licenses.gpl3;
+    maintainers = with maintainers; [ flokli garbas the-kenny ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/notmuch/muchsync.nix b/nixpkgs/pkgs/applications/networking/mailreaders/notmuch/muchsync.nix
new file mode 100644
index 000000000000..e25dfe834f65
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/notmuch/muchsync.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl
+, notmuch, openssl, pkgconfig, sqlite, xapian, zlib
+}:
+stdenv.mkDerivation rec {
+  version = "5";
+  name = "muchsync-${version}";
+  passthru = {
+    inherit version;
+  };
+  src = fetchurl {
+    url = "http://www.muchsync.org/src/${name}.tar.gz";
+    sha256 = "1k2m44pj5i6vfhp9icdqs42chsp208llanc666p3d9nww8ngq2lb";
+  };
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ notmuch openssl sqlite xapian zlib ];
+  meta = {
+    description = "Synchronize maildirs and notmuch databases";
+    homepage = "http://www.muchsync.org/";
+    platforms = stdenv.lib.platforms.unix;
+    maintainers = with stdenv.lib.maintainers; [ ocharles ];
+    license = stdenv.lib.licenses.gpl2Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/notmuch/mutt.nix b/nixpkgs/pkgs/applications/networking/mailreaders/notmuch/mutt.nix
new file mode 100644
index 000000000000..410e5e10ceb6
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/notmuch/mutt.nix
@@ -0,0 +1,46 @@
+{ stdenv, lib, perl, perlPackages, makeWrapper, coreutils, notmuch }:
+
+stdenv.mkDerivation rec {
+  name = "notmuch-mutt-${version}";
+  version = notmuch.version;
+
+  outputs = [ "out" ];
+
+  dontStrip = true;
+
+  buildInputs = [
+    perl
+    makeWrapper
+  ] ++ (with perlPackages; [
+    FileRemove
+    DigestSHA1
+    Later
+    MailBox
+    MailMaildir
+    MailTools
+    StringShellQuote
+    TermReadLineGnu
+  ]);
+
+  src = notmuch.src;
+
+  phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
+
+  installPhase = ''
+    ${coreutils}/bin/install -Dm755 \
+      ./contrib/notmuch-mutt/notmuch-mutt \
+      $out/bin/notmuch-mutt
+
+    wrapProgram $out/bin/notmuch-mutt \
+      --prefix PERL5LIB : $PERL5LIB
+  '';
+
+  meta = with lib; {
+    inherit version;
+    description = "Mutt support for notmuch";
+    homepage    = https://notmuchmail.org/;
+    license     = with licenses; gpl3;
+    maintainers = with maintainers; [ peterhoeg ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/nylas-mail-bin/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/nylas-mail-bin/default.nix
new file mode 100644
index 000000000000..3d8673a87a1b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/nylas-mail-bin/default.nix
@@ -0,0 +1,133 @@
+{ dpkg, fetchurl, lib, pkgs, stdenv
+, alsaLib
+, atk
+, cairo
+, coreutils
+, cups
+, dbus
+, desktop-file-utils
+, expat
+, fontconfig
+, freetype
+, gcc-unwrapped
+, gdk_pixbuf
+, glib
+, gnome2
+, libgnome-keyring
+, libnotify
+, makeWrapper
+, nodejs
+, nspr
+, nss
+, pango
+, python2
+, udev
+, wget
+, xorg
+}:
+
+stdenv.mkDerivation rec {
+  name = "${pkgname}-${version}";
+  pkgname = "nylas-mail-bin";
+  version = "2.0.32";
+  subVersion = "fec7941";
+
+  src =
+    if stdenv.hostPlatform.system == "x86_64-linux" then
+      fetchurl {
+        url = "https://edgehill.s3.amazonaws.com/${version}-${subVersion}/linux-deb/x64/NylasMail.deb";
+        sha256 = "40060aa1dc3b5187b8ed4a07b9de3427e3c5a291df98c2c82395647fa2aa4ada";
+      }
+    else
+      throw "NylasMail is not supported on ${stdenv.hostPlatform.system}";
+
+  propagatedBuildInputs = [
+    alsaLib
+    atk
+    cairo
+    coreutils
+    cups
+    dbus
+    desktop-file-utils
+    expat
+    fontconfig
+    freetype
+    gcc-unwrapped
+    gdk_pixbuf
+    glib
+    gnome2.GConf
+    gnome2.gtk
+    libgnome-keyring
+    libnotify
+    nodejs
+    nspr
+    nss
+    pango
+    python2
+    udev
+    wget
+    xorg.libX11
+    xorg.libXScrnSaver
+    xorg.libXcomposite
+    xorg.libXcursor
+    xorg.libXdamage
+    xorg.libXext
+    xorg.libXfixes
+    xorg.libXi
+    xorg.libXrandr
+    xorg.libXrender
+    xorg.libXtst
+    xorg.libxkbfile
+  ];
+
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  buildCommand = ''
+    mkdir -p $out
+
+    ${dpkg}/bin/dpkg-deb -x $src unpacked
+    mv unpacked/usr/* $out/
+
+    # Fix path in desktop file
+    substituteInPlace $out/share/applications/nylas-mail.desktop \
+      --replace /usr/bin/nylas-mail $out/bin/nylas-mail
+
+    # Patch librariess
+    noderp=$(patchelf --print-rpath $out/share/nylas-mail/libnode.so)
+    patchelf --set-rpath $noderp:$out/lib:${stdenv.cc.cc.lib}/lib:${xorg.libxkbfile.out}/lib:${lib.makeLibraryPath propagatedBuildInputs } \
+      $out/share/nylas-mail/libnode.so
+
+    ffrp=$(patchelf --print-rpath $out/share/nylas-mail/libffmpeg.so)
+    patchelf --set-rpath $ffrp:$out/lib:${stdenv.cc.cc.lib}/lib:${lib.makeLibraryPath propagatedBuildInputs } \
+      $out/share/nylas-mail/libffmpeg.so
+
+    # Patch binaries
+    binrp=$(patchelf --print-rpath $out/share/nylas-mail/nylas)
+    patchelf --interpreter $(cat "$NIX_CC"/nix-support/dynamic-linker) \
+      --set-rpath $binrp:$out/lib:${stdenv.cc.cc.lib}/lib:${lib.makeLibraryPath propagatedBuildInputs } \
+      $out/share/nylas-mail/nylas
+
+    wrapProgram $out/share/nylas-mail/nylas --set LD_LIBRARY_PATH "${xorg.libxkbfile}/lib:${pkgs.gnome3.libgnome-keyring}/lib";
+
+    # Fix path to bash so apm can install plugins.
+    substituteInPlace $out/share/nylas-mail/resources/apm/bin/apm \
+      --replace /bin/bash ${stdenv.shell}
+
+    wrapProgram $out/share/nylas-mail/resources/apm/bin/apm \
+      --set PATH "${coreutils}/bin"
+    patchelf --interpreter $(cat "$NIX_CC"/nix-support/dynamic-linker) \
+      --set-rpath ${gcc-unwrapped.lib}/lib $out/share/nylas-mail/resources/apm/bin/node
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Open-source mail client built on the modern web with Electron, React, and Flux";
+    longDescription = ''
+      Nylas Mail is an open-source mail client built on the modern web with Electron, React, and Flux. It is designed to be extensible, so it's easy to create new experiences and workflows around email. Nylas Mail can be enabled with it's requirements by enabling 'services.nylas-mail.enable=true'. Alternatively, make sure to have services.gnome3.gnome-keyring.enable = true; in your configuration.nix before running nylas-mail. If you happen to miss this step, you should remove ~/.nylas-mail and "~/.config/Nylas Mail" for a blank setup".
+    '';
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ johnramsden ];
+    homepage = https://nylas.com;
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/realpine/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/realpine/default.nix
new file mode 100644
index 000000000000..f53c5d61050a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/realpine/default.nix
@@ -0,0 +1,42 @@
+{stdenv, fetchurl, ncurses, tcl, openssl, pam, kerberos
+, openldap
+}:
+# NOTE: Please check if any changes here are applicable to ../alpine/ as well
+let
+  baseName = "re-alpine";
+  version = "2.03";
+in
+stdenv.mkDerivation {
+  name = "${baseName}-${version}";
+  inherit version;
+
+  src = fetchurl {
+    url = "mirror://sourceforge/re-alpine/re-alpine-${version}.tar.bz2";
+    sha256 = "11xspzbk9cwmklmcw6rxsan7j71ysd4m9c7qldlc59ck595k5nbh";
+  };
+
+  buildInputs = [
+    ncurses tcl openssl pam kerberos openldap
+  ];
+
+  hardeningDisable = [ "format" ];
+
+  configureFlags = [
+    "--with-ssl-include-dir=${openssl.dev}/include/openssl"
+    "--with-tcl-lib=${tcl.libPrefix}"
+    "--with-passfile=.pine-passfile"
+  ];
+
+  preConfigure = ''
+    export NIX_LDFLAGS="$NIX_LDFLAGS -lgcc_s"
+  '';
+
+  meta = {
+    description = "Console mail reader";
+    license = stdenv.lib.licenses.asl20;
+    maintainers = [stdenv.lib.maintainers.raskin];
+    platforms = stdenv.lib.platforms.linux;
+    homepage = https://sourceforge.net/projects/re-alpine/;
+    downloadPage = "https://sourceforge.net/projects/re-alpine/files/";
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/sup/.bundix/cache b/nixpkgs/pkgs/applications/networking/mailreaders/sup/.bundix/cache
new file mode 100644
index 000000000000..5894e96022c8
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/sup/.bundix/cache
@@ -0,0 +1,4 @@
+---
+gem:
+  https://rubygems.org/downloads/mini_portile-0.6.0.gem: 09kcn4g63xrdirgwxgjikqg976rr723bkc9bxfr29pk22cj3wavn
+  https://rubygems.org/downloads/gpgme-2.0.7.gem: 1p84zhiri2ihcld7py9mwc2kg5xs5da8fk11zhndrhmw05yvf5mr
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/sup/Gemfile b/nixpkgs/pkgs/applications/networking/mailreaders/sup/Gemfile
new file mode 100644
index 000000000000..bc37456ae58e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/sup/Gemfile
@@ -0,0 +1,9 @@
+source "https://rubygems.org"
+
+gem 'rake'
+gem 'sup'
+gem 'gpgme'
+
+# Sup tries to `xapian-ruby` in its extconf instead of listing it as a
+# dependency.
+gem 'xapian-ruby', "~> 1.2.22"
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/sup/Gemfile.lock b/nixpkgs/pkgs/applications/networking/mailreaders/sup/Gemfile.lock
new file mode 100644
index 000000000000..0691919ba182
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/sup/Gemfile.lock
@@ -0,0 +1,41 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    chronic (0.9.1)
+    gpgme (2.0.12)
+      mini_portile2 (~> 2.1.0)
+    highline (1.7.8)
+    locale (2.1.2)
+    lockfile (2.1.3)
+    mime-types (3.0)
+      mime-types-data (~> 3.2015)
+    mime-types-data (3.2016.0221)
+    mini_portile2 (2.1.0)
+    ncursesw (1.4.9)
+    rake (11.1.2)
+    rmail-sup (1.0.1)
+    sup (0.22.1)
+      chronic (~> 0.9.1)
+      highline
+      locale (~> 2.0)
+      lockfile
+      mime-types (> 2.0)
+      ncursesw (~> 1.4.0)
+      rmail-sup (~> 1.0.1)
+      trollop (>= 1.12)
+      unicode (~> 0.4.4)
+    trollop (2.1.2)
+    unicode (0.4.4.2)
+    xapian-ruby (1.2.22)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  gpgme
+  rake
+  sup
+  xapian-ruby (~> 1.2.22)
+
+BUNDLED WITH
+   1.10.6
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/sup/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/sup/default.nix
new file mode 100644
index 000000000000..c803db6dcbc1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/sup/default.nix
@@ -0,0 +1,23 @@
+{ lib, bundlerEnv, ruby }:
+
+bundlerEnv {
+  name = "sup-0.22.1";
+
+  inherit ruby;
+
+  # Updated with:
+  # nix-shell -p bundix -p bundler -p ncurses -p ruby -p which -p zlib -p libuuid
+  # bundle install --path ./vendor
+  # bundix
+  gemfile = ./Gemfile;
+  lockfile = ./Gemfile.lock;
+  gemset = ./gemset.nix;
+
+  meta = with lib; {
+    description = "A curses threads-with-tags style email client";
+    homepage    = http://sup-heliotrope.github.io;
+    license     = licenses.gpl2;
+    maintainers = with maintainers; [ cstrahan lovek323 ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/sup/gemset.nix b/nixpkgs/pkgs/applications/networking/mailreaders/sup/gemset.nix
new file mode 100644
index 000000000000..babc063d6346
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/sup/gemset.nix
@@ -0,0 +1,126 @@
+{
+  xapian-ruby = {
+    version = "1.2.22";
+    source = {
+      type = "gem";
+      remotes = ["https://rubygems.org"];
+      sha256 = "1xbarnxmhy6r0rxpspn4wk85j183w6b18nah73djcs06b3gfas15";
+    };
+    dependencies = [ "rake" ];
+  };
+  unicode = {
+    version = "0.4.4.2";
+    source = {
+      type = "gem";
+      remotes = ["https://rubygems.org"];
+      sha256 = "15fggljzan8zvmr8h12b5m7pcj1gvskmmnx367xs4p0rrpnpil8g";
+    };
+  };
+  trollop = {
+    version = "2.1.2";
+    source = {
+      type = "gem";
+      remotes = ["https://rubygems.org"];
+      sha256 = "0415y63df86sqj43c0l82and65ia5h64if7n0znkbrmi6y0jwhl8";
+    };
+  };
+  sup = {
+    version = "0.22.1";
+    source = {
+      type = "gem";
+      remotes = ["https://rubygems.org"];
+      sha256 = "17s2sxismf46zdhgr6g2v53fw9f3sp1ijx7xdw3wx8qpcsgazcgi";
+    };
+    dependencies = ["chronic" "highline" "locale" "lockfile" "mime-types" "ncursesw" "rmail-sup" "trollop" "unicode" "rake" ];
+  };
+  rmail-sup = {
+    version = "1.0.1";
+    source = {
+      type = "gem";
+      remotes = ["https://rubygems.org"];
+      sha256 = "1xswk101s560lxqaax3plqh8vjx7jjspnggdwb3q80m358f92q9g";
+    };
+  };
+  rake = {
+    version = "11.1.2";
+    source = {
+      type = "gem";
+      remotes = ["https://rubygems.org"];
+      sha256 = "0jfmy7kd543ldi3d4fg35a1w7q6jikpnzxqj4bzchfbn94cbabqz";
+    };
+  };
+  ncursesw = {
+    version = "1.4.9";
+    source = {
+      type = "gem";
+      remotes = ["https://rubygems.org"];
+      sha256 = "154cls3b237imdbhih7rni5p85nw6mpbpkzdw08jxzvqaml7q093";
+    };
+  };
+  mini_portile2 = {
+    version = "2.1.0";
+    source = {
+      type = "gem";
+      remotes = ["https://rubygems.org"];
+      sha256 = "1y25adxb1hgg1wb2rn20g3vl07qziq6fz364jc5694611zz863hb";
+    };
+  };
+  mime-types-data = {
+    version = "3.2016.0221";
+    source = {
+      type = "gem";
+      remotes = ["https://rubygems.org"];
+      sha256 = "05ygjn0nnfh6yp1wsi574jckk95wqg9a6g598wk4svvrkmkrzkpn";
+    };
+  };
+  mime-types = {
+    version = "3.0";
+    source = {
+      type = "gem";
+      remotes = ["https://rubygems.org"];
+      sha256 = "1snjc38a9vqvy8j41xld1i1byq9prbl955pbjw7dxqcfcirqlzra";
+    };
+    dependencies = ["mime-types-data"];
+  };
+  lockfile = {
+    version = "2.1.3";
+    source = {
+      type = "gem";
+      remotes = ["https://rubygems.org"];
+      sha256 = "0dij3ijywylvfgrpi2i0k17f6w0wjhnjjw0k9030f54z56cz7jrr";
+    };
+  };
+  locale = {
+    version = "2.1.2";
+    source = {
+      type = "gem";
+      remotes = ["https://rubygems.org"];
+      sha256 = "1sls9bq4krx0fmnzmlbn64dw23c4d6pz46ynjzrn9k8zyassdd0x";
+    };
+  };
+  highline = {
+    version = "1.7.8";
+    source = {
+      type = "gem";
+      remotes = ["https://rubygems.org"];
+      sha256 = "1nf5lgdn6ni2lpfdn4gk3gi47fmnca2bdirabbjbz1fk9w4p8lkr";
+    };
+  };
+  gpgme = {
+    version = "2.0.12";
+    source = {
+      type = "gem";
+      remotes = ["https://rubygems.org"];
+      sha256 = "0a04a76dw9dias0a8rp6dyk3vx2y024gim40lg2md6zdh2m1kx85";
+    };
+    dependencies = ["mini_portile2"];
+  };
+  chronic = {
+    version = "0.9.1";
+    source = {
+      type = "gem";
+      remotes = ["https://rubygems.org"];
+      sha256 = "0kspaxpfy7yvyk1lvpx31w852qfj8wb9z04mcj5bzi70ljb9awqk";
+    };
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/sylpheed/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/sylpheed/default.nix
new file mode 100644
index 000000000000..70f74dff3097
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/sylpheed/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchurl, pkgconfig, gtk2, openssl ? null, gpgme ? null
+, gpgSupport ? true, sslSupport ? true }:
+
+assert gpgSupport -> gpgme != null;
+assert sslSupport -> openssl != null;
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  name = "sylpheed-${version}";
+  version = "3.7.0";
+
+  src = fetchurl {
+    url = "https://sylpheed.sraoss.jp/sylpheed/v3.7/${name}.tar.xz";
+    sha256 = "0j9y5vdzch251s264diw9clrn88dn20bqqkwfmis9l7m8vmwasqd";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  buildInputs = [ gtk2 ]
+    ++ optionals gpgSupport [ gpgme ]
+    ++ optionals sslSupport [ openssl ];
+
+  configureFlags = [
+    (optional gpgSupport "--enable-gpgme")
+    (optional sslSupport "--enable-ssl")
+  ];
+
+  meta = {
+    homepage = http://sylpheed.sraoss.jp/en/;
+    description = "Lightweight and user-friendly e-mail client";
+    maintainers = with maintainers; [ eelco ];
+    platforms = platforms.linux ++ platforms.darwin;
+    license = licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix
new file mode 100644
index 000000000000..7f32e45f5d31
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix
@@ -0,0 +1,179 @@
+{ stdenv, fetchurl, config, makeWrapper
+, gconf
+, alsaLib
+, at-spi2-atk
+, atk
+, cairo
+, cups
+, curl
+, dbus-glib
+, dbus
+, fontconfig
+, freetype
+, gdk_pixbuf
+, glib
+, glibc
+, gst-plugins-base
+, gstreamer
+, gtk2
+, gtk3
+, kerberos
+, libX11
+, libXScrnSaver
+, libXcomposite
+, libXdamage
+, libXext
+, libXfixes
+, libXinerama
+, libXrender
+, libXt
+, libcanberra-gtk2
+, libgnome
+, libgnomeui
+, gnome3
+, libGLU_combined
+, nspr
+, nss
+, pango
+, writeScript
+, xidel
+, coreutils
+, gnused
+, gnugrep
+, gnupg
+, runtimeShell
+}:
+
+# imports `version` and `sources`
+with (import ./release_sources.nix);
+
+let
+  arch = if stdenv.hostPlatform.system == "i686-linux"
+    then "linux-i686"
+    else "linux-x86_64";
+
+  isPrefixOf = prefix: string:
+    builtins.substring 0 (builtins.stringLength prefix) string == prefix;
+
+  sourceMatches = locale: source:
+      (isPrefixOf source.locale locale) && source.arch == arch;
+
+  systemLocale = config.i18n.defaultLocale or "en-US";
+
+  defaultSource = stdenv.lib.findFirst (sourceMatches "en-US") {} sources;
+
+  source = stdenv.lib.findFirst (sourceMatches systemLocale) defaultSource sources;
+
+  name = "thunderbird-bin-${version}";
+in
+
+stdenv.mkDerivation {
+  inherit name;
+
+  src = fetchurl {
+    url = "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/${version}/${source.arch}/${source.locale}/thunderbird-${version}.tar.bz2";
+    inherit (source) sha512;
+  };
+
+  phases = "unpackPhase installPhase";
+
+  libPath = stdenv.lib.makeLibraryPath
+    [ stdenv.cc.cc
+      gconf
+      alsaLib
+      at-spi2-atk
+      atk
+      cairo
+      cups
+      curl
+      dbus-glib
+      dbus
+      fontconfig
+      freetype
+      gdk_pixbuf
+      glib
+      glibc
+      gst-plugins-base
+      gstreamer
+      gtk2
+      gtk3
+      kerberos
+      libX11
+      libXScrnSaver
+      libXcomposite
+      libXdamage
+      libXext
+      libXfixes
+      libXinerama
+      libXrender
+      libXt
+      libcanberra-gtk2
+      libgnome
+      libgnomeui
+      libGLU_combined
+      nspr
+      nss
+      pango
+    ] + ":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" [
+      stdenv.cc.cc
+    ];
+
+  buildInputs = [ gtk3 gnome3.adwaita-icon-theme ];
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase =
+    ''
+      mkdir -p "$prefix/usr/lib/thunderbird-bin-${version}"
+      cp -r * "$prefix/usr/lib/thunderbird-bin-${version}"
+
+      mkdir -p "$out/bin"
+      ln -s "$prefix/usr/lib/thunderbird-bin-${version}/thunderbird" "$out/bin/"
+
+      for executable in \
+        thunderbird crashreporter thunderbird-bin plugin-container updater
+      do
+        patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+          "$out/usr/lib/thunderbird-bin-${version}/$executable"
+      done
+
+      find . -executable -type f -exec \
+        patchelf --set-rpath "$libPath" \
+          "$out/usr/lib/thunderbird-bin-${version}/{}" \;
+
+      # Create a desktop item.
+      mkdir -p $out/share/applications
+      cat > $out/share/applications/thunderbird.desktop <<EOF
+      [Desktop Entry]
+      Type=Application
+      Exec=$out/bin/thunderbird
+      Icon=$out/usr/lib/thunderbird-bin-${version}/chrome/icons/default/default256.png
+      Name=Thunderbird
+      GenericName=Mail Reader
+      Categories=Application;Network;
+      EOF
+
+      wrapProgram "$out/bin/thunderbird" \
+        --argv0 "$out/bin/.thunderbird-wrapped" \
+        --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:" \
+        --suffix XDG_DATA_DIRS : "$XDG_ICON_DIRS"
+    '';
+
+  passthru.updateScript = import ./../../browsers/firefox-bin/update.nix {
+    inherit name stdenv writeScript xidel coreutils gnused gnugrep curl gnupg runtimeShell;
+    baseName = "thunderbird";
+    channel = "release";
+    basePath = "pkgs/applications/networking/mailreaders/thunderbird-bin";
+    baseUrl = "http://archive.mozilla.org/pub/thunderbird/releases/";
+  };
+  meta = with stdenv.lib; {
+    description = "Mozilla Thunderbird, a full-featured email client (binary package)";
+    homepage = http://www.mozilla.org/thunderbird/;
+    license = {
+      free = false;
+      url = http://www.mozilla.org/en-US/foundation/trademarks/policy/;
+    };
+    maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/thunderbird-bin/release_sources.nix b/nixpkgs/pkgs/applications/networking/mailreaders/thunderbird-bin/release_sources.nix
new file mode 100644
index 000000000000..b34fde7b7c1b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/thunderbird-bin/release_sources.nix
@@ -0,0 +1,585 @@
+{
+  version = "60.6.0";
+  sources = [
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/ar/thunderbird-60.6.0.tar.bz2";
+      locale = "ar";
+      arch = "linux-x86_64";
+      sha512 = "ba14ed80e0b18cc3b40a1bf1810eb67a246f6e995d527e625432eb24dce46bde85dd0dbcac5590d74b8bbb7be900f266b72055349f9b0ea6839fb8d5779aa54d";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/ast/thunderbird-60.6.0.tar.bz2";
+      locale = "ast";
+      arch = "linux-x86_64";
+      sha512 = "b6ab87d344c3e806a2316022a6c8632dcd9548c745766e136ca9aa70f54fe744587849372fc7426173a91996ff4709aee85f8e5de2565add3bbac58d370e7a96";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/be/thunderbird-60.6.0.tar.bz2";
+      locale = "be";
+      arch = "linux-x86_64";
+      sha512 = "2d5f88efb2f6e3be552cb503bfe184a3ad6b395da3139c6c97585f490d9a02c5ce391c0f6b3b1be0505b63f0b8af70da9eca8820b5baefc3dc043a60abb47d5a";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/bg/thunderbird-60.6.0.tar.bz2";
+      locale = "bg";
+      arch = "linux-x86_64";
+      sha512 = "16b7b8d54e200b9156a346a0e4b80cb5c91a0297222a3f4a227770344d6453fea679d7c8a512eb9d879abe262ce34c2dab654cbe60aab13d0cc7919757dcae8d";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/br/thunderbird-60.6.0.tar.bz2";
+      locale = "br";
+      arch = "linux-x86_64";
+      sha512 = "d20854f75f09f95489a1d647bbdeed9062a553dcede68f48672d0a0a82001e283a7d24162a6110ce3efa1a1bdd846ca7fe036c37a20f63bf8dcd54d80a767084";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/ca/thunderbird-60.6.0.tar.bz2";
+      locale = "ca";
+      arch = "linux-x86_64";
+      sha512 = "8477742f367c2e4206ba61afcef372d39163aeba5e781ea9a089b0d3cf9ef44be8ce6bd3417490616a51aff3152a52eb3599b2acf66e0186e696c9df29b9732b";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/cs/thunderbird-60.6.0.tar.bz2";
+      locale = "cs";
+      arch = "linux-x86_64";
+      sha512 = "b434e8763a93df511dcc9c032d11c0a26c7583f7ce01980be63ea453f8d503e703cddca5e5a67db619cb1b9690d0256c91eec8166fff30733186e429d3c513a8";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/cy/thunderbird-60.6.0.tar.bz2";
+      locale = "cy";
+      arch = "linux-x86_64";
+      sha512 = "71a6a2642dfce4505ed3b6b551ffdd5c469f1261191b73d3bd09bdf98788297536b3b94dd52327d263d4b1256080ff0317d8e10e09b53871ab805b426892e9a0";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/da/thunderbird-60.6.0.tar.bz2";
+      locale = "da";
+      arch = "linux-x86_64";
+      sha512 = "e24c19e5caafd4b4c5081acf700fb175e07c1702da0af111122cf793e4791d38c49902e1b9574ab9606482c539677e6caad2b9f8f655ac0fb24f1b0c8454c456";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/de/thunderbird-60.6.0.tar.bz2";
+      locale = "de";
+      arch = "linux-x86_64";
+      sha512 = "e9ec916a00bfd50745c95ed42976eeb0b9cc314165b6401e24e1433a68fa5591c3020397a0c35566072784e423b42132d4e55dc307a47d34c693d5fe9e3e6380";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/dsb/thunderbird-60.6.0.tar.bz2";
+      locale = "dsb";
+      arch = "linux-x86_64";
+      sha512 = "4fd72e0ba6982c0aeba4911a626aa7dea2d6678502aec9523efb5e89b613b20b471d50a2667df000541279ff961fc3323ebaa16d3482c2bebcaa33ec849a05d3";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/el/thunderbird-60.6.0.tar.bz2";
+      locale = "el";
+      arch = "linux-x86_64";
+      sha512 = "bd86c6855ce42bf52ca6822e6fd3cfd7e09c9fd2577407c666b46d84afcf43655f30dc0e3546ae41b84eb5ca7e681072fae90a08de9dd017c3594dea4e5b9bb8";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/en-GB/thunderbird-60.6.0.tar.bz2";
+      locale = "en-GB";
+      arch = "linux-x86_64";
+      sha512 = "47009db4f18cad43a9d4ba20a4edbfbb07cc5222cb65121dfe45eb3c9120fd18277d5601309f9f3f21eebe10fd70201a9d15815fd35ef6f9d3f95360d939a0ec";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/en-US/thunderbird-60.6.0.tar.bz2";
+      locale = "en-US";
+      arch = "linux-x86_64";
+      sha512 = "86bfb05041e347430c424652f8fcb102aa44c0bb68bf1b7a55ce888fcefa2ac08f55bb4bcbe7a558aaf3214ae694b97a6805f14de2ce575968fa2a1988e281ba";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/es-AR/thunderbird-60.6.0.tar.bz2";
+      locale = "es-AR";
+      arch = "linux-x86_64";
+      sha512 = "87a5caeb7d8f8846c52b9a7344260e480efce156239559a890bf5e167939cd35e2223ef4ad2429b196a87ca164b02eb7df3dd03ed1f52f95bf30d75afec40fd8";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/es-ES/thunderbird-60.6.0.tar.bz2";
+      locale = "es-ES";
+      arch = "linux-x86_64";
+      sha512 = "ec6a17263d696b2fa4195349fd3badaf7ac7dbdf93ee7247a77d27aa13daf5de06db8c2df3449b06e6d28fc032e9c4eeb897be8b1a798e9fb7b68f3c8509d6d8";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/et/thunderbird-60.6.0.tar.bz2";
+      locale = "et";
+      arch = "linux-x86_64";
+      sha512 = "d4591fdc97c5c1654f59116670e8516c12b53311e6f76f13711c04c86cfbf4cbd893a2f5f657b27fc44ad9919e3c0b5192ae98b26281ef4df6863fc522d50a7b";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/eu/thunderbird-60.6.0.tar.bz2";
+      locale = "eu";
+      arch = "linux-x86_64";
+      sha512 = "316b4d9d515b23476d29c0136c9981d281f7a3628aacd18f912640a2b6e1d5b53d66d42e9300af6b2cb78e4ada7458d0002c3d4a5ac7f5129db3dd66f4358341";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/fi/thunderbird-60.6.0.tar.bz2";
+      locale = "fi";
+      arch = "linux-x86_64";
+      sha512 = "944742e4331c7ccbc27d887d9d5702ced9807d743d57e8a14b18f4dd6b2148ed24b295eb498c09d1d54f2f1110abfd9e2acbad83a882189d0d7e5403dbe650b4";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/fr/thunderbird-60.6.0.tar.bz2";
+      locale = "fr";
+      arch = "linux-x86_64";
+      sha512 = "1dfeaeb5e6985ebd820188721377589ebf4b993337a4231f6d036ae05173e8fb33c17bae76a3982e34a98da934d584d0efec4e01d6045b24345ea66299ecfe19";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/fy-NL/thunderbird-60.6.0.tar.bz2";
+      locale = "fy-NL";
+      arch = "linux-x86_64";
+      sha512 = "6e61fc74b45e75170157806c8f358b5236e5de79e1d07db4f7834bebf2b9822d90377334ec1f2cf44a838c52c7135711b5a7036a0336813fe79c7dc3aa43e25e";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/ga-IE/thunderbird-60.6.0.tar.bz2";
+      locale = "ga-IE";
+      arch = "linux-x86_64";
+      sha512 = "7de19973a7e9770cfdd9ff944e9bea8e6755a81e2fd41ce27ff0d16bfe948534294c18f2f7ca05092aa574bea6fadd5a90bb08ca6472c27e7b0cdc6c15d25341";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/gd/thunderbird-60.6.0.tar.bz2";
+      locale = "gd";
+      arch = "linux-x86_64";
+      sha512 = "1d5309b6eb47b16b49142ba18de96b285fc0f91a7eb3be5cac576683da37143c1e91318dff4f039119668679acf3c2643bdde9a26788f0bb240cebaa5f907389";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/gl/thunderbird-60.6.0.tar.bz2";
+      locale = "gl";
+      arch = "linux-x86_64";
+      sha512 = "ecb09d7d8e6b5705d4c71d306a1556a74f78617520e59f041e3b63a0116f0472717c5f3bb055fda3c5c9fd72b198d997704292f64bc60349ec29efe057c46d52";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/he/thunderbird-60.6.0.tar.bz2";
+      locale = "he";
+      arch = "linux-x86_64";
+      sha512 = "7ced9d95c40376ee1334e5c5cb2bb9fd6e5cefcc26dc134fb5ef71bc20b6476b263ee742d3e0634517ca399c61c776bd7347b58c2c9bd0c395949756d1d0f5af";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/hr/thunderbird-60.6.0.tar.bz2";
+      locale = "hr";
+      arch = "linux-x86_64";
+      sha512 = "c9cb6cd5b3d7f1091f55b74af73825d2d0e8b763ffc102a1d49e58b2ac9e6fe2fdd81c1bcf7effd53d86c1ba8f662e3ae0b413ef80bafcb6e2ae64d34c7f3311";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/hsb/thunderbird-60.6.0.tar.bz2";
+      locale = "hsb";
+      arch = "linux-x86_64";
+      sha512 = "e4f8092eb72e8311459a9232dc55342c2ff61b232d0b3a1be04acde78d7c06f14108f68378de200cadbe58125cddf46fddd421f76ac0d046e1a796fc5277278e";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/hu/thunderbird-60.6.0.tar.bz2";
+      locale = "hu";
+      arch = "linux-x86_64";
+      sha512 = "ba1ca73de9b3b0137e38c10bbf29cd28310a7e2e58804de75247da098401f4b609d414e55a25b9646c16dae353db9d6fd193e437e42b7659d66f0ec9117e8629";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/hy-AM/thunderbird-60.6.0.tar.bz2";
+      locale = "hy-AM";
+      arch = "linux-x86_64";
+      sha512 = "d5fbb20b9a75be427f1fb2a3c3674397b04793469dc3f493ec9bbf631e83a52573700540832cfe7faf71c16908ee0bc7bcd84b3cbd6e10fde950d477b27bc6dc";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/id/thunderbird-60.6.0.tar.bz2";
+      locale = "id";
+      arch = "linux-x86_64";
+      sha512 = "35b1d1db2dc6c38b8d2fce2652857d9251e287acad125ab19c5e20487ac5ee6d4ad01d8f6d6cfc1ed9618cb8a47666d9c64e725b2d1f11894741e8cf99a887f8";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/is/thunderbird-60.6.0.tar.bz2";
+      locale = "is";
+      arch = "linux-x86_64";
+      sha512 = "548170e5b1c2d7c09d4792f012064e5bbb201236768ba92fa318821b83101a395f3a4cd06560db89c23561eda20078921902aaa9b7ecbb201c356149af3d55cc";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/it/thunderbird-60.6.0.tar.bz2";
+      locale = "it";
+      arch = "linux-x86_64";
+      sha512 = "026fc8d2b61eaff1f34ce7726923697ba5c7563b65fbb9bbd700e88998d198eee595348cc47135c5dc8589201fcf0d75141acd5d1e49980ccc5c544b545bb424";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/ja/thunderbird-60.6.0.tar.bz2";
+      locale = "ja";
+      arch = "linux-x86_64";
+      sha512 = "deb6e23d8c3c700d7de3f433862040ae5db610012cfd4a8faaf239a6429662d625d8a40c583f22797e34afbeec7dd6888a1558155e0878f4a84ea71694cc97ef";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/kab/thunderbird-60.6.0.tar.bz2";
+      locale = "kab";
+      arch = "linux-x86_64";
+      sha512 = "e6c1dba878c8bfcd4031123f0578512b0cfad675ddfd89859d5ea25b2c112195f788cb1d3e0deec12ca1f052c2c0bfdeda2527402cf0d51f54e781029a6e3b47";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/kk/thunderbird-60.6.0.tar.bz2";
+      locale = "kk";
+      arch = "linux-x86_64";
+      sha512 = "70dd97b4d5db05463deff785fbd9dbdb649c00ec79d8f1cf009ab54961efafc45f12da654367b0df58211a8fe57597cba7743b7557dc121bbf1d838aa692809a";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/ko/thunderbird-60.6.0.tar.bz2";
+      locale = "ko";
+      arch = "linux-x86_64";
+      sha512 = "8faf4d44bb882107805c663462170e96593f10e7218fa3a1e244937ee3965901d712c89edf9cbc4fefba85c91662c1a7e2811cf1bc3390377cd8ea3f3c8e29e0";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/lt/thunderbird-60.6.0.tar.bz2";
+      locale = "lt";
+      arch = "linux-x86_64";
+      sha512 = "604b8283cce3cddd90ae65be0d32ce7051bbe360fb772e47be60fa3312330d38b46d240b9e61eed3134fadef90aca9ac930ae6512dfdc1343104edff928be54c";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/ms/thunderbird-60.6.0.tar.bz2";
+      locale = "ms";
+      arch = "linux-x86_64";
+      sha512 = "b4af3085260ece6e30b482e9e8335a75298335b0b551a8219bbc04521d41d0088d483134df8801a529934320ab5d51b99b388177b9432b7fdcbd7391ac11b22d";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/nb-NO/thunderbird-60.6.0.tar.bz2";
+      locale = "nb-NO";
+      arch = "linux-x86_64";
+      sha512 = "75022e5524379f4683d6e85bfc057480dcc003d421ec256ade11ba9f4eb60b74c65a7131f07987cecd5a13d8e61dbf2c71446e4c2cbfd9efa65a1c86939e82aa";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/nl/thunderbird-60.6.0.tar.bz2";
+      locale = "nl";
+      arch = "linux-x86_64";
+      sha512 = "301dfe0a9ce8743703c1f4968bb9bd7b9881a7b70ce1760c12e9a9b2ffe386e8c85406a2b3121981676e4ba2f9ae5a32782857a168965f1fd93530cb22dc3ddd";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/nn-NO/thunderbird-60.6.0.tar.bz2";
+      locale = "nn-NO";
+      arch = "linux-x86_64";
+      sha512 = "67704f6dc56fb2d396cd5154d32648464cbf331890dfbe30c6870f63d8f26d8f46322c2b2c40cec86fdbd7b93eeacae2551b0e699428749c89acb715bf8d00b2";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/pl/thunderbird-60.6.0.tar.bz2";
+      locale = "pl";
+      arch = "linux-x86_64";
+      sha512 = "6477cf8274f38d3922edf51e0a419936d2ac494906c06fcf78c99ae95847c2fd4530e03d1574f7ba4b5d1221e98a71bb1a7e3810a1ebcd72c4e412f0e85c3c31";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/pt-BR/thunderbird-60.6.0.tar.bz2";
+      locale = "pt-BR";
+      arch = "linux-x86_64";
+      sha512 = "775ccbd6e8adda7318a5ff9d364d6d8b3d8af39208a349f61123550a149c728f7d6248c27b3b4561c8445c1c7c53300579f073b47ba31a52b68a8570515e6329";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/pt-PT/thunderbird-60.6.0.tar.bz2";
+      locale = "pt-PT";
+      arch = "linux-x86_64";
+      sha512 = "057a2b690dfd529be26ddc225f6f760190315721ef69ab0d9974788b7c00617704af82ec56cbb502a3854945b624896ceb800ba1a31080fe9984fe12af4d301f";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/rm/thunderbird-60.6.0.tar.bz2";
+      locale = "rm";
+      arch = "linux-x86_64";
+      sha512 = "10c4edf026d5b924d5105201179f8f5f6ecf5917e99efb60c663325ef98e5ba63f965954c93e3962af454111656687abd2be65e0c552617f8fc7eb6ee3b339bf";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/ro/thunderbird-60.6.0.tar.bz2";
+      locale = "ro";
+      arch = "linux-x86_64";
+      sha512 = "d6a4fe46346b6699d570e316c7e97b530100923771d4ab76878dbea959dcd1c34e694c3a968eb786d19be96e0b7757952d47a87bc52f99d078eefc9a2483dd7f";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/ru/thunderbird-60.6.0.tar.bz2";
+      locale = "ru";
+      arch = "linux-x86_64";
+      sha512 = "14b79c2751306b7e66cc3049c0338c16042c60fd707275f25775692b09c28fbd30b46886fdb2c8205de342e29cc0519887f8f92efd369e92a0a94ab33a5cba3a";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/si/thunderbird-60.6.0.tar.bz2";
+      locale = "si";
+      arch = "linux-x86_64";
+      sha512 = "a8781bfe6bf9ceac67bab6e2f2957d61bb5d27292a15ea24776bdd8dda4b7828a350ec8caaae40a894db85b9d9fe4d457172f8dcedd681fa58912eef74ade60a";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/sk/thunderbird-60.6.0.tar.bz2";
+      locale = "sk";
+      arch = "linux-x86_64";
+      sha512 = "b22ef7083b344f8dec27b09631468c1263cb436479cfffc82b95ec78fc05ef66ec9b133d612dd097f9c24096b9c4e538efde6a88150816268a3a5a2d81a8e1fb";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/sl/thunderbird-60.6.0.tar.bz2";
+      locale = "sl";
+      arch = "linux-x86_64";
+      sha512 = "b3a295b4f1a27a75634bae5dbf033973849659bf9dc9fdecf33b90618aa919bf644e2211c789ceefa495cc72e6586ed1db1683658ca88f0fe4cb3ed7a909a208";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/sq/thunderbird-60.6.0.tar.bz2";
+      locale = "sq";
+      arch = "linux-x86_64";
+      sha512 = "5f990f0f257d7b096f4310de22a0ea26f27b18e5f7566f3eed45bed66ff89e384f55b7932fd5ce65039077ff902631db3feffce69d2e6a8e13893586759d14b3";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/sr/thunderbird-60.6.0.tar.bz2";
+      locale = "sr";
+      arch = "linux-x86_64";
+      sha512 = "71623636dca3b89af58feeb1b998b9bf16c8f8c7ff7c8f273aafc0500ce4b5d4bfae3e997d8669e3075c6586b631df0a613ba062fc4d74cf281f686aa7b18109";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/sv-SE/thunderbird-60.6.0.tar.bz2";
+      locale = "sv-SE";
+      arch = "linux-x86_64";
+      sha512 = "2e0f6115a0e1b538288594ff47b92b1eb688a26e5f67bb7b83b5c01fe781efe414fc8a9e2c289fd7312026fa1b9bc56588a0c0b25172c35d1e224269a779e40b";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/tr/thunderbird-60.6.0.tar.bz2";
+      locale = "tr";
+      arch = "linux-x86_64";
+      sha512 = "fa3aa0c732a4e2feda079d283f6d0f98eb721a88e98a7df70681acb50d525e48af273deb19e6d2e5f41d20fc5daddf0c89c3e6d9ced74ccc34bd75fc12ebf26b";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/uk/thunderbird-60.6.0.tar.bz2";
+      locale = "uk";
+      arch = "linux-x86_64";
+      sha512 = "535fff2ee782b9818f3953314b084f5d63af4457310e8236b5dbe0fb7d0db5ef3c1aa0efbb992ef32ad89cd1df3ad50acae26fc116eae474b6b6970cb1172772";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/vi/thunderbird-60.6.0.tar.bz2";
+      locale = "vi";
+      arch = "linux-x86_64";
+      sha512 = "54bfad80adc5f4a97e5dbb098e4330a7248b650178e9a9f49b2252fe1a15afb7e247f9af29253f59c7ff43e8af67a96f1cf069f3919ecd53ce0ff953e6cb42de";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/zh-CN/thunderbird-60.6.0.tar.bz2";
+      locale = "zh-CN";
+      arch = "linux-x86_64";
+      sha512 = "7452bdee386e1e85967d7b88c6f935cb89ba7dece1f39d3b20f24cdd04a99793d3a11c333b76d107fe88d8c4c3eb69947be11792af7f8657515c48eda655d237";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-x86_64/zh-TW/thunderbird-60.6.0.tar.bz2";
+      locale = "zh-TW";
+      arch = "linux-x86_64";
+      sha512 = "0c1a7048f250bb0f3248ed92ad2e45d3bb01b308eaa6115cde9050253d960b6538467ea6c5754c6f5458035fe31bd2fc529ab423f6ca9da179dfb7f51ef1f612";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/ar/thunderbird-60.6.0.tar.bz2";
+      locale = "ar";
+      arch = "linux-i686";
+      sha512 = "c04863a1693b2e0567eda646f6364b58cbf959c61045ba1948aebe9f30f63351888cca4a70de4a1655b48ee0407e0c665691c6ffcc2638c18b70046eb04cb02c";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/ast/thunderbird-60.6.0.tar.bz2";
+      locale = "ast";
+      arch = "linux-i686";
+      sha512 = "ed4c86716aa7ca675577f577f62bf11f025ba96a061e0c89952a99ad5e3ba3e3edb01dd8d428cd0884fdc78127453dcfde0e81ecb4ba3e11e650022f6df07102";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/be/thunderbird-60.6.0.tar.bz2";
+      locale = "be";
+      arch = "linux-i686";
+      sha512 = "fff19d979335f90004f35646edf2c4ca7f1243a013d79c246db6a0139f787573bd2db2636adf503366a94d44cf8b932d2141ff1df2faced750ac6c604116d6da";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/bg/thunderbird-60.6.0.tar.bz2";
+      locale = "bg";
+      arch = "linux-i686";
+      sha512 = "afcbb510382a811af5afadf306ce66915f472a3cac62ec2e2ab5930c795fd443600c02743be29db3bbbccf3c9d8507bf54ad0452bd580de4f9db52d5438aa596";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/br/thunderbird-60.6.0.tar.bz2";
+      locale = "br";
+      arch = "linux-i686";
+      sha512 = "3ca375f94f1f5795b2676d1e8774fc17e3eb0824ceeef6b4598b99f35265806a017e0dfbf2b07f275eae92b68fa975b05cf2d66c6adfd1147399ee7be3df94eb";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/ca/thunderbird-60.6.0.tar.bz2";
+      locale = "ca";
+      arch = "linux-i686";
+      sha512 = "75d31ded8c44d8429c58f8c6bc1b5104a4b62a3d0899ac81ba9deb277204290d7ae079e6baf4b243188db7e1050b4a0b9046dd26ca8fa546083fdfbbf724bd01";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/cs/thunderbird-60.6.0.tar.bz2";
+      locale = "cs";
+      arch = "linux-i686";
+      sha512 = "0ead8f9276a6dcfaf39c1d400c892f95d431cee960c94857cd3e95e6f148571ed946325e6518bcea5821aaeb0e8f8f5dbbdd3970aad9cda549dbfc07eb2392ff";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/cy/thunderbird-60.6.0.tar.bz2";
+      locale = "cy";
+      arch = "linux-i686";
+      sha512 = "fb9d58efc4b0a72a1bbe09624d38b83227c94a2584b4a852b95753d83481b64194e6d14578fe24210581feaf5b8ccf55c530cb3bae606ea6acd39a456a91dcc4";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/da/thunderbird-60.6.0.tar.bz2";
+      locale = "da";
+      arch = "linux-i686";
+      sha512 = "1bf483526e7e52626b6298c93c6586d1973cdd9c3aec660b31550b4658690e8454622276d2bac3b096acceb8e9b41fbf7db735ed8a2c185ee968e489a62ae329";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/de/thunderbird-60.6.0.tar.bz2";
+      locale = "de";
+      arch = "linux-i686";
+      sha512 = "1bdaf4b2a5ce2b1824250b4fd35695ce9c3be306b8c21d9002995e142f6a655166df15d3f68f80dc0f5963f31e87d01b00ee8c4463c6002df0eb536fc3eb2bfb";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/dsb/thunderbird-60.6.0.tar.bz2";
+      locale = "dsb";
+      arch = "linux-i686";
+      sha512 = "0b6f71ec6d02f06dde3509fd1fb771a341b12a7a44681d05244aa7ea61726f8f8792ff12a72b0700196162047b23b7a9741a3522519935813b075d617c79490c";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/el/thunderbird-60.6.0.tar.bz2";
+      locale = "el";
+      arch = "linux-i686";
+      sha512 = "bec935b6e469400f7d88fee26dab49c8159dd8a74bd34827122d23276e6b5e837dbedb8281b0a2c1b87e90d2897e2dc15a475ac53bf911f15887280630ef82fa";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/en-GB/thunderbird-60.6.0.tar.bz2";
+      locale = "en-GB";
+      arch = "linux-i686";
+      sha512 = "4e28d8bbc384c98767825e16111d24a96ad2291f40b1eb7b295ab2b7103482a9aa11c00ae5e455ea7e5a7e5d077a4d7c45e6f8890c69e7c7c237909c332bad75";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/en-US/thunderbird-60.6.0.tar.bz2";
+      locale = "en-US";
+      arch = "linux-i686";
+      sha512 = "6b5619c5a03a4d585b030682fc41069c3ebe3c783578853c3c36c9055fe03c78c782f2621c12a454b4968e5416e01312639ef48047b407558dd6ad85fd81befd";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/es-AR/thunderbird-60.6.0.tar.bz2";
+      locale = "es-AR";
+      arch = "linux-i686";
+      sha512 = "9b6828c7c646f0483b758902d2cfd7897649acfc1622d1a338320d0f9a9f52b38dc8734ace3816fd4a116883ff7c9ffdfbae6b93e5070697a108a7df207de1d1";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/es-ES/thunderbird-60.6.0.tar.bz2";
+      locale = "es-ES";
+      arch = "linux-i686";
+      sha512 = "e0a8d2e68602cb5a9c0bca574ff8ed797c0e71a2bd86519e7d7de1ca8fc54316bead8ccc35e7f8dbc26cb11ab76e59076c09e69edb8175947c7c0dfab5758e3f";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/et/thunderbird-60.6.0.tar.bz2";
+      locale = "et";
+      arch = "linux-i686";
+      sha512 = "c597b215fb574f948ed3cd169f7fd814a9f23e5c797da8457d9c810097f71b26751b386280cbba2fbf0224d07665c2fa33c3cb19c0fc54bbb0146fa271b25442";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/eu/thunderbird-60.6.0.tar.bz2";
+      locale = "eu";
+      arch = "linux-i686";
+      sha512 = "9c1dfdeb74e6882689c036995d20ea7d0cbe9f3b406ec15b7a71d1f890cd209d3e7b03f6ce35d778adfcad2dfcfeb20ad55b9888dd222ffdb429166c8ad3a905";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/fi/thunderbird-60.6.0.tar.bz2";
+      locale = "fi";
+      arch = "linux-i686";
+      sha512 = "fa24033927751c7b1cffbd3e165507d8cc0ef7ac7755f08afe102b9b9a339d0a31b8f738d1bb71bc0a8876f51a1411b4840b033a3716306e5e8a17eb4d7f0382";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/fr/thunderbird-60.6.0.tar.bz2";
+      locale = "fr";
+      arch = "linux-i686";
+      sha512 = "37daee1b1c0f1757a0098806d41bcd71c0dfd700bce2f7da58ec670c58d2b5fefcef2fde102bed7fa6daa62b59404716c26547de54a00eaed6201616c681b5ac";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/fy-NL/thunderbird-60.6.0.tar.bz2";
+      locale = "fy-NL";
+      arch = "linux-i686";
+      sha512 = "85b2a6fa843d5364eaaacbc3399ad4a05169a7c988640f3a120fabe994bca31b0c22019a8537d598a14d33dc75f2037cda5504cb7d72149fec1ff040e1f962bd";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/ga-IE/thunderbird-60.6.0.tar.bz2";
+      locale = "ga-IE";
+      arch = "linux-i686";
+      sha512 = "475b766786a50d461ec6896b72c4eef83231f903672d275513c632eb8f4e7e1dd24bc635c18c066fdada4616b99116b3757d59d2718bc8bf21bfa495abea9a5f";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/gd/thunderbird-60.6.0.tar.bz2";
+      locale = "gd";
+      arch = "linux-i686";
+      sha512 = "d5ee56fd14c4abbf9d3335cd75e284d6c00ed28db74ffd2a726a19dbed21a74e2d97e9dcb63d63bca31f3637380a29f3bdd1280c670e446850ba8d4e98971395";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/gl/thunderbird-60.6.0.tar.bz2";
+      locale = "gl";
+      arch = "linux-i686";
+      sha512 = "262b36a73483dc3a379d416862f6f5c6d685a366f25a2599ba527d28fe0a17da9f3d377c38559a0688cfc5e5927001d3db7db0693fdbae44ba5596ac92c1a72f";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/he/thunderbird-60.6.0.tar.bz2";
+      locale = "he";
+      arch = "linux-i686";
+      sha512 = "404838f4defcb0da984532ba32740c9919ebf57c9e68137e43b1e40263a4f553a573028bc96c9f056141e405b4528e060ead4e30dcdc365e87069393b0056a5f";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/hr/thunderbird-60.6.0.tar.bz2";
+      locale = "hr";
+      arch = "linux-i686";
+      sha512 = "9793e03d4b01c90af721a0197e20ea61c30e09e602321e214674a85ba5366a4eb4a394d0a2347af2a3f8c7f40da2eff50bb25c935db7b59cf573b8e6033469e1";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/hsb/thunderbird-60.6.0.tar.bz2";
+      locale = "hsb";
+      arch = "linux-i686";
+      sha512 = "bd5be5e781edef1d410ed85552d72449e94b13c28a9943cc64ea4bf8092ed477ad61a39eb956b3ed008168a62206a0684ae8b38f370ac88a3c67df78ed57720d";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/hu/thunderbird-60.6.0.tar.bz2";
+      locale = "hu";
+      arch = "linux-i686";
+      sha512 = "a5f7e309efb45715dd67b4fb5ee1a88ac4c6ae54d5755c2476cff246d93abca6725116817173c72e701cfd570329f1d84f7732e3eaf3e7fd96e238512298c595";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/hy-AM/thunderbird-60.6.0.tar.bz2";
+      locale = "hy-AM";
+      arch = "linux-i686";
+      sha512 = "145e562fdf0ea143d0c1e9f4581f2b2fc58bf085aa227e4486e780f7da54e7e0b1cce53cfe9dad1ac47aca50beee5e554f3494c7df2e2c240a3a9b350d5f46b8";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/id/thunderbird-60.6.0.tar.bz2";
+      locale = "id";
+      arch = "linux-i686";
+      sha512 = "6f865a97783fe0269547981367717de6577780b24eeab33e26a19fc716cd4733cca28b7fab8cb8156b6a04b09e09b75cfca8b43c07aa99088cfe98a96a716361";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/is/thunderbird-60.6.0.tar.bz2";
+      locale = "is";
+      arch = "linux-i686";
+      sha512 = "756301497644e2656a383f0c76a7723b1ce9ab49f760e08cc6f0159c898634664dcf5f92952310c408ecf8818939a25b3b181fd50836d32d017dc4c45b67dc25";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/it/thunderbird-60.6.0.tar.bz2";
+      locale = "it";
+      arch = "linux-i686";
+      sha512 = "4ebfd6d2dd79e238594286412516729b66fa26d99ed3d6a399428bca87f63bd3f329877f70702d1d43229755268b0e9c951c753ce110250e805cdcdf576e0eb1";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/ja/thunderbird-60.6.0.tar.bz2";
+      locale = "ja";
+      arch = "linux-i686";
+      sha512 = "0cbdd253afec94716c0a4ce4131e8260cf7e42d9a7df48210875524ca33d42fc7c011b3b9724b29054844b159896cf9a03fd817af4cfbae9b718777d4f4b278d";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/kab/thunderbird-60.6.0.tar.bz2";
+      locale = "kab";
+      arch = "linux-i686";
+      sha512 = "cf363a3e2177d2ac629713674bd22da270887882f21dccefbd6ca30c71f535c5b69fe1c05554fbed95920d4ebc4acc1649a05be1594b1cad5f4b17a7652f3e74";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/kk/thunderbird-60.6.0.tar.bz2";
+      locale = "kk";
+      arch = "linux-i686";
+      sha512 = "77555e556b3d04ebc07390633e4ba3a3fda8c7ca9c8e7a61f522633a20378c857522598a3ad1b3b55e03bff181df615186183947c7770a3afc3df6c18d58446c";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/ko/thunderbird-60.6.0.tar.bz2";
+      locale = "ko";
+      arch = "linux-i686";
+      sha512 = "634c0ba3322494670df3c7d14b8866d55f185588d1fe6dde706da86a66481f98deefed6739561f3c0c73ca005e1581d541da773c5d3d7caddd5b49510d9f138e";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/lt/thunderbird-60.6.0.tar.bz2";
+      locale = "lt";
+      arch = "linux-i686";
+      sha512 = "9646f54ebabca5e8503d44b099871bfb6345cd4a3fe04ab0211aa8f019800b48faae93eb5565428818c4cf25b8b1e536614f23e4fcac76791c06482aa9fd7396";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/ms/thunderbird-60.6.0.tar.bz2";
+      locale = "ms";
+      arch = "linux-i686";
+      sha512 = "ecec0bac0770bd3cad75881266aea00a9ae3c8506a64e000ffb118cc18cb28a3968b9ece10e11bbc4628612065345ab1f58df0df130a2e497809a244049c1774";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/nb-NO/thunderbird-60.6.0.tar.bz2";
+      locale = "nb-NO";
+      arch = "linux-i686";
+      sha512 = "271be3b2bf2424bb149e7f1a1c11564e9b9d849e043a95489a8215a3ce757d032cfce2ff5df1b666fec5cad00b7a540b437d6d0ef33ccec485a0b5b96f61e8bd";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/nl/thunderbird-60.6.0.tar.bz2";
+      locale = "nl";
+      arch = "linux-i686";
+      sha512 = "a80e354c855d51fc278fc46e83ad41de079f1aff1fb7d0329eba377c07ecf67621f9c11e2c51760b23aeea4547eacc7916f3092e61009b162283a8f4458b5573";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/nn-NO/thunderbird-60.6.0.tar.bz2";
+      locale = "nn-NO";
+      arch = "linux-i686";
+      sha512 = "312414bf118a808ad663807dfab5f69bca61a8f20087cfeac78883a869cd43eb03d5c7dd511a32350c0f59b0e28de7bc1992ce3ba48d8e1b5fe3c2abc09441af";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/pl/thunderbird-60.6.0.tar.bz2";
+      locale = "pl";
+      arch = "linux-i686";
+      sha512 = "4abf25e59400c038e9719200459903e3e113302592bf65d024c1dd05852d51e2969f3f53a33dd55f9d131bcd1405571f713a6dc3165d8af1147616574f4aa5c4";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/pt-BR/thunderbird-60.6.0.tar.bz2";
+      locale = "pt-BR";
+      arch = "linux-i686";
+      sha512 = "ca38fec5178dfc2f841dea0d30490df8be3e4424a2d94bda1a3cf1cbb1908df90c29adafe3f844ec13f2bf87606fcf20066d3789b29440b55762a9c83ff5bfb9";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/pt-PT/thunderbird-60.6.0.tar.bz2";
+      locale = "pt-PT";
+      arch = "linux-i686";
+      sha512 = "f8c25a0d9d6a4ca582c7d3593c8a74c1931fdd4a85ca9ac2af0b37efb877ac0232e9188af5cb5985f1a865aabb252b58197cace1f6cff3ce4551b5f4678eea56";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/rm/thunderbird-60.6.0.tar.bz2";
+      locale = "rm";
+      arch = "linux-i686";
+      sha512 = "ab74f4fa6729d6f7c2f0fb1f99c457ccd65a81be9bb5d7519beef4ec1ddf58c9f51370e7e3fbf71f2a8781f2669b50d20e65e687794b7dfeccb7da99865bd614";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/ro/thunderbird-60.6.0.tar.bz2";
+      locale = "ro";
+      arch = "linux-i686";
+      sha512 = "cb086a6ce3446ee8437c762040b03ee58a3cebd1a0cf473197e7da19d81704bd1ae7cda5d3329e17e76d1f7e682674a12bda3e964fa934fd271d80cfcb5da907";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/ru/thunderbird-60.6.0.tar.bz2";
+      locale = "ru";
+      arch = "linux-i686";
+      sha512 = "2334973a52a5e954b082be0bc9921a6034532edf558a2ffc2b1ffaad7d1d8777832cfe21e005290c65f4ed906816243dc3c1a35a5e078f005ebe84f3769cbad0";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/si/thunderbird-60.6.0.tar.bz2";
+      locale = "si";
+      arch = "linux-i686";
+      sha512 = "aa7a52b410a507571551430d538fe4b84efbc57bad8eb89631c2c79f8bd23399a60e8ba8018e9b086d6562ef4e0e96b5f6b912952838ef38507a6eb41e776fe6";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/sk/thunderbird-60.6.0.tar.bz2";
+      locale = "sk";
+      arch = "linux-i686";
+      sha512 = "4cef3b0059d27313ff35610fc273b7c02faaeb21996a5b62be6cefd0c4b76162fd8a54bae3e2f6527135bfc97ed8133cde34e51505d8abb25d90a03716427370";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/sl/thunderbird-60.6.0.tar.bz2";
+      locale = "sl";
+      arch = "linux-i686";
+      sha512 = "6e4e2771a18bf7af347fff15eb5b5c312b7373d2fa86474317154ed8ae48e996028cda78ad9ac5ad09839af9844039334a25349df2c45c30095606f684b849b4";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/sq/thunderbird-60.6.0.tar.bz2";
+      locale = "sq";
+      arch = "linux-i686";
+      sha512 = "eb1d190808ad33b2eecfd8979c3ae669f44c3426bc247781b11698818f1804ba1b28851b7c7f507b676c87d86d89b7f537d378a130997dc21cd8870e070dedcf";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/sr/thunderbird-60.6.0.tar.bz2";
+      locale = "sr";
+      arch = "linux-i686";
+      sha512 = "bd46e690c9969d65563075996581c9ff13576143425985764a1fef4d2d6d4bf55cecd1e52b3e7a237b187a9144c928578879737f16c4b59be29120b67b18526d";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/sv-SE/thunderbird-60.6.0.tar.bz2";
+      locale = "sv-SE";
+      arch = "linux-i686";
+      sha512 = "19e859d0f94de0b4cd82fb35a63a32cc9dfe09c74429380c90f749748e17123f161398a465b53aa333c50863a256be99df4029f45d08f80a7695b45883c94799";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/tr/thunderbird-60.6.0.tar.bz2";
+      locale = "tr";
+      arch = "linux-i686";
+      sha512 = "964a16f7836a1dcfda273db6c65ea22d516722e410ceb961ee8212540837911ba3b156d5c365a7c1a79c7d2239b0df03dc1176a266d09b075c1e5b870a833352";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/uk/thunderbird-60.6.0.tar.bz2";
+      locale = "uk";
+      arch = "linux-i686";
+      sha512 = "aee1e5a933bcb5238263ebc6ea57e9d3fe851c19c5c017e1e15bbb9e5cf1e9f39edf75b1b908caa4da688e14e41e4318a7fca0c41d045355cdc91b9ef48ba957";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/vi/thunderbird-60.6.0.tar.bz2";
+      locale = "vi";
+      arch = "linux-i686";
+      sha512 = "dd667bf5db90586bb29c97c8dd3bd0d50c5f4c5f5cbebdfc908dda4a54e72575edcf5d5b8bed97b1b6aa7350ea79c767115137aa6500b263bd5ae80d61efdbc1";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/zh-CN/thunderbird-60.6.0.tar.bz2";
+      locale = "zh-CN";
+      arch = "linux-i686";
+      sha512 = "f791ad02b1a67ac2906602a3c90238e5e8062fedea5851a790196eb1da0e19174543a7dc00e53460d40a0c39089c109125875fbec458fd65a650ab7d438cafdf";
+    }
+    { url = "http://archive.mozilla.org/pub/thunderbird/releases/60.6.0/linux-i686/zh-TW/thunderbird-60.6.0.tar.bz2";
+      locale = "zh-TW";
+      arch = "linux-i686";
+      sha512 = "83cec9f663cd4e02d921f2f96a7dab791cdb015756f63148833491a263abb297bed5ee64101b4ae86ea4a3ed09b75d668bcf36a12563885f3eb164655b3348bd";
+    }
+    ];
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/thunderbird/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/thunderbird/default.nix
new file mode 100644
index 000000000000..e419b68ad81b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/thunderbird/default.nix
@@ -0,0 +1,198 @@
+{ lib, stdenv, fetchurl, pkgconfig, gtk2, pango, perl, python, zip, fetchpatch
+, libIDL, libjpeg, zlib, dbus, dbus-glib, bzip2, xorg
+, freetype, fontconfig, file, nspr, nss, libnotify
+, yasm, libGLU_combined, sqlite, unzip
+, hunspell, libevent, libstartup_notification
+, icu, libpng, jemalloc
+, autoconf213, which, m4
+, writeScript, xidel, common-updater-scripts, coreutils, gnused, gnugrep, curl, runtimeShell
+, cargo, rustc, llvmPackages
+, enableGTK3 ? false, gtk3, gnome3, wrapGAppsHook, makeWrapper
+, enableCalendar ? true
+, debugBuild ? false
+, # If you want the resulting program to call itself "Thunderbird" instead
+  # of "Earlybird" or whatever, enable this option.  However, those
+  # binaries may not be distributed without permission from the
+  # Mozilla Foundation, see
+  # http://www.mozilla.org/foundation/trademarks/.
+  enableOfficialBranding ? false
+, makeDesktopItem
+}:
+
+let
+  wrapperTool = if enableGTK3 then wrapGAppsHook else makeWrapper;
+  gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
+in stdenv.mkDerivation rec {
+  name = "thunderbird-${version}";
+  version = "60.6.0";
+
+  src = fetchurl {
+    url = "mirror://mozilla/thunderbird/releases/${version}/source/thunderbird-${version}.source.tar.xz";
+    sha512 = "2s8h6z3rkylrclng1cpmj5dvsbhqymrdwvjy3g2s8rq66xca13wkyswdhgh8671d0dw9bmminikk53d2xqg7lqvvd1rdsminwscln4z";
+  };
+
+  # from firefox, but without sound libraries
+  buildInputs =
+    [ gtk2 zip libIDL libjpeg zlib bzip2
+      dbus dbus-glib pango freetype fontconfig xorg.libXi
+      xorg.libX11 xorg.libXrender xorg.libXft xorg.libXt file
+      nspr nss libnotify xorg.pixman yasm libGLU_combined
+      xorg.libXScrnSaver xorg.xorgproto
+      xorg.libXext sqlite unzip
+      hunspell libevent libstartup_notification /* cairo */
+      icu libpng jemalloc
+    ]
+    ++ lib.optionals enableGTK3 [ gtk3 gnome3.adwaita-icon-theme ];
+
+  # from firefox + m4 + wrapperTool
+  nativeBuildInputs = [ m4 autoconf213 which gnused pkgconfig perl python wrapperTool cargo rustc ];
+
+  patches = [
+    # Remove buildconfig.html to prevent a dependency on clang etc.
+    ./no-buildconfig.patch
+  ];
+
+  configureFlags =
+    [ # from firefox, but without sound libraries (alsa, libvpx, pulseaudio)
+      "--enable-application=comm/mail"
+      "--disable-alsa"
+      "--disable-pulseaudio"
+
+      "--with-system-jpeg"
+      "--with-system-zlib"
+      "--with-system-bz2"
+      "--with-system-nspr"
+      "--with-system-nss"
+      "--with-system-libevent"
+      "--with-system-png" # needs APNG support
+      "--with-system-icu"
+      "--enable-rust-simd"
+      "--enable-system-ffi"
+      "--enable-system-hunspell"
+      "--enable-system-pixman"
+      "--enable-system-sqlite"
+      #"--enable-system-cairo"
+      "--enable-startup-notification"
+      "--disable-crashreporter"
+      "--disable-tests"
+      "--disable-necko-wifi" # maybe we want to enable this at some point
+      "--disable-updater"
+      "--enable-jemalloc"
+      "--disable-gconf"
+      "--enable-default-toolkit=cairo-gtk${if enableGTK3 then "3" else "2"}"
+      "--enable-js-shell"
+    ]
+      ++ lib.optional enableCalendar "--enable-calendar"
+      ++ (if debugBuild then [ "--enable-debug" "--enable-profiling"]
+                        else [ "--disable-debug" "--enable-release"
+                               "--disable-debug-symbols"
+                               "--enable-optimize" "--enable-strip" ])
+      ++ lib.optional enableOfficialBranding "--enable-official-branding"
+      ++ lib.optionals (lib.versionAtLeast version "56" && !stdenv.hostPlatform.isi686) [
+        # on i686-linux: --with-libclang-path is not available in this configuration
+        "--with-libclang-path=${llvmPackages.libclang}/lib"
+        "--with-clang-path=${llvmPackages.clang}/bin/clang"
+      ];
+
+  enableParallelBuilding = true;
+
+  preConfigure =
+    ''
+      cxxLib=$( echo -n ${gcc}/include/c++/* )
+      archLib=$cxxLib/$( ${gcc}/bin/gcc -dumpmachine )
+
+      test -f layout/style/ServoBindings.toml && sed -i -e '/"-DRUST_BINDGEN"/ a , "-cxx-isystem", "'$cxxLib'", "-isystem", "'$archLib'"' layout/style/ServoBindings.toml
+
+      configureScript="$(realpath ./configure)"
+      mkdir ../objdir
+      cd ../objdir
+    '';
+
+  dontWrapGApps = true; # we do it ourselves
+  postInstall =
+    ''
+      # TODO: Move to a dev output?
+      rm -rf $out/include $out/lib/thunderbird-devel-* $out/share/idl
+
+      # $binary is a symlink to $target.
+      # We wrap $target by replacing the $binary symlink.
+      local target="$out/lib/thunderbird/thunderbird"
+      local binary="$out/bin/thunderbird"
+
+      # Wrap correctly, this is needed to
+      # 1) find Mozilla runtime, because argv0 must be the real thing,
+      #    or a symlink thereto. It cannot be the wrapper itself
+      # 2) detect itself as the default mailreader across builds
+      gappsWrapperArgs+=(
+        --argv0 "$target"
+        --set MOZ_APP_LAUNCHER thunderbird
+      )
+      ${
+        # We wrap manually because wrapGAppsHook does not detect the symlink
+        # To mimic wrapGAppsHook, we run it with dontWrapGApps, so
+        # gappsWrapperArgs gets defined correctly
+        lib.optionalString enableGTK3 "wrapGAppsHook"
+      }
+
+      # "$binary" is a symlink, replace it by the wrapper
+      rm "$binary"
+      makeWrapper "$target" "$binary" "''${gappsWrapperArgs[@]}"
+
+      ${ let desktopItem = makeDesktopItem {
+          name = "thunderbird";
+          exec = "thunderbird %U";
+          desktopName = "Thunderbird";
+          icon = "$out/lib/thunderbird/chrome/icons/default/default256.png";
+          genericName = "Mail Reader";
+          categories = "Application;Network";
+          mimeType = stdenv.lib.concatStringsSep ";" [
+            # Email
+            "x-scheme-handler/mailto"
+            "message/rfc822"
+            # Newsgroup
+            "x-scheme-handler/news"
+            "x-scheme-handler/snews"
+            "x-scheme-handler/nntp"
+            # Feed
+            "x-scheme-handler/feed"
+            "application/rss+xml"
+            "application/x-extension-rss"
+          ];
+        }; in desktopItem.buildCommand
+      }
+    '';
+
+  postFixup =
+    # Fix notifications. LibXUL uses dlopen for this, unfortunately; see #18712.
+    ''
+      patchelf --set-rpath "${lib.getLib libnotify
+        }/lib:$(patchelf --print-rpath "$out"/lib/thunderbird*/libxul.so)" \
+          "$out"/lib/thunderbird*/libxul.so
+    '';
+
+  doInstallCheck = true;
+  installCheckPhase =
+    ''
+      # Some basic testing
+      "$out/bin/thunderbird" --version
+    '';
+
+  disallowedRequisites = [ stdenv.cc ];
+
+  meta = with stdenv.lib; {
+    description = "A full-featured e-mail client";
+    homepage = http://www.mozilla.org/thunderbird/;
+    license =
+      # Official branding implies thunderbird name and logo cannot be reuse,
+      # see http://www.mozilla.org/foundation/licensing.html
+      if enableOfficialBranding then licenses.proprietary else licenses.mpl11;
+    maintainers = [ maintainers.pierron maintainers.eelco ];
+    platforms = platforms.linux;
+  };
+
+  passthru.updateScript = import ./../../browsers/firefox/update.nix {
+    attrPath = "thunderbird";
+    baseUrl = "http://archive.mozilla.org/pub/thunderbird/releases/";
+    inherit stdenv writeScript lib common-updater-scripts xidel coreutils gnused gnugrep curl runtimeShell;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/thunderbird/no-buildconfig.patch b/nixpkgs/pkgs/applications/networking/mailreaders/thunderbird/no-buildconfig.patch
new file mode 100644
index 000000000000..65eba3a2fc28
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/thunderbird/no-buildconfig.patch
@@ -0,0 +1,23 @@
+diff -ru -x '*~' a/docshell/base/nsAboutRedirector.cpp b/docshell/base/nsAboutRedirector.cpp
+--- a/docshell/base/nsAboutRedirector.cpp	2017-07-31 18:20:51.000000000 +0200
++++ b/docshell/base/nsAboutRedirector.cpp	2017-09-26 22:02:00.814151731 +0200
+@@ -32,8 +32,6 @@
+     {"about", "chrome://global/content/aboutAbout.xhtml", 0},
+     {"addons", "chrome://mozapps/content/extensions/extensions.xul",
+      nsIAboutModule::ALLOW_SCRIPT},
+-    {"buildconfig", "chrome://global/content/buildconfig.html",
+-     nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT},
+     {"checkerboard", "chrome://global/content/aboutCheckerboard.xhtml",
+      nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
+          nsIAboutModule::ALLOW_SCRIPT},
+diff -ru -x '*~' a/toolkit/content/jar.mn b/toolkit/content/jar.mn
+--- a/toolkit/content/jar.mn	2017-07-31 18:20:52.000000000 +0200
++++ b/toolkit/content/jar.mn	2017-09-26 22:01:42.383350314 +0200
+@@ -39,7 +39,6 @@
+    content/global/plugins.css
+    content/global/browser-child.js
+    content/global/browser-content.js
+-*   content/global/buildconfig.html
+    content/global/buildconfig.css
+    content/global/contentAreaUtils.js
+    content/global/datepicker.xhtml
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/trojita/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/trojita/default.nix
new file mode 100644
index 000000000000..2d96d0336132
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/trojita/default.nix
@@ -0,0 +1,37 @@
+{ mkDerivation
+, lib
+, fetchurl
+, cmake
+, qtbase
+, qtwebkit
+, qttools
+}:
+
+mkDerivation rec {
+  name = "trojita-${version}";
+  version = "0.7";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/trojita/trojita/${name}.tar.xz";
+    sha256 = "1n9n07md23ny6asyw0xpih37vlwzp7vawbkprl7a1bqwfa0si3g0";
+  };
+
+  buildInputs = [
+    qtbase
+    qtwebkit
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    qttools
+  ];
+
+
+  meta = with lib; {
+    description = "A Qt IMAP e-mail client";
+    homepage = http://trojita.flaska.net/;
+    license = with licenses; [ gpl2 gpl3 ];
+    platforms = platforms.linux;
+  };
+
+}