2018-04-16 01:22:22 +01:00
|
|
|
{ fetchurl, stdenv, wrapGAppsHook, autoreconfHook
|
2018-02-25 02:23:58 +00:00
|
|
|
, curl, dbus, dbus-glib, enchant, gtk2, gnutls, gnupg, gpgme, hicolor-icon-theme
|
|
|
|
, libarchive, libcanberra-gtk2, libetpan, libnotify, libsoup, libxml2, networkmanager
|
2018-04-16 01:22:22 +01:00
|
|
|
, openldap, perl, pkgconfig, poppler, python, shared-mime-info, webkitgtk24x-gtk2
|
2018-02-25 02:23:58 +00:00
|
|
|
, glib-networking, gsettings-desktop-schemas, libSM, libytnef
|
2014-09-29 21:21:56 +01:00
|
|
|
# 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 ? false
|
2015-12-12 12:31:07 +00:00
|
|
|
, enablePgp ? true
|
2014-09-29 21:21:56 +01:00
|
|
|
, enablePluginArchive ? false
|
|
|
|
, enablePluginFancy ? false
|
|
|
|
, enablePluginNotificationDialogs ? true
|
|
|
|
, enablePluginNotificationSounds ? true
|
|
|
|
, enablePluginPdf ? false
|
2018-04-16 01:22:22 +01:00
|
|
|
, enablePluginPython ? false
|
2014-09-29 21:21:56 +01:00
|
|
|
, enablePluginRavatar ? false
|
|
|
|
, enablePluginRssyl ? false
|
|
|
|
, enablePluginSmime ? false
|
|
|
|
, enablePluginSpamassassin ? false
|
|
|
|
, enablePluginSpamReport ? false
|
|
|
|
, enablePluginVcalendar ? false
|
|
|
|
, enableSpellcheck ? false
|
|
|
|
}:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
2016-01-30 20:08:09 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2014-09-29 21:21:56 +01:00
|
|
|
name = "claws-mail-${version}";
|
2019-01-08 08:38:13 +00:00
|
|
|
version = "3.17.3";
|
2014-09-29 21:21:56 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-10-03 11:42:50 +01:00
|
|
|
url = "http://www.claws-mail.org/download.php?file=releases/claws-mail-${version}.tar.xz";
|
2019-01-08 08:38:13 +00:00
|
|
|
sha256 = "1wnj6c9cbmhphs2l6wfvndkk2g08rmxw0sl2c8k1k008dxd1ykjh";
|
2014-09-29 21:21:56 +01:00
|
|
|
};
|
|
|
|
|
2017-10-28 10:22:26 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2015-09-18 12:20:16 +01:00
|
|
|
patches = [ ./mime.patch ];
|
|
|
|
|
2018-04-16 01:22:22 +01:00
|
|
|
preConfigure = ''
|
|
|
|
# autotools check tries to dlopen libpython as a requirement for the python plugin
|
|
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${python}/lib
|
|
|
|
'';
|
|
|
|
|
2015-09-27 19:33:37 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/procmime.c \
|
2018-02-25 02:23:58 +00:00
|
|
|
--subst-var-by MIMEROOTDIR ${shared-mime-info}/share
|
2015-09-27 19:33:37 +01:00
|
|
|
'';
|
|
|
|
|
2018-04-16 01:22:22 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig wrapGAppsHook python.pkgs.wrapPython ];
|
|
|
|
propagatedBuildInputs = with python.pkgs; [ python ] ++ optionals enablePluginPython [ pygtk pygobject2 ];
|
2017-04-24 19:23:44 +01:00
|
|
|
|
2014-09-29 21:21:56 +01:00
|
|
|
buildInputs =
|
2018-02-25 02:23:58 +00:00
|
|
|
[ curl dbus dbus-glib gtk2 gnutls gsettings-desktop-schemas hicolor-icon-theme
|
2018-04-16 01:22:22 +01:00
|
|
|
libetpan perl glib-networking libSM libytnef
|
2015-09-30 09:31:45 +01:00
|
|
|
]
|
2014-09-29 21:21:56 +01:00
|
|
|
++ optional enableSpellcheck enchant
|
|
|
|
++ optionals (enablePgp || enablePluginSmime) [ gnupg gpgme ]
|
|
|
|
++ optional enablePluginArchive libarchive
|
2018-02-25 02:23:58 +00:00
|
|
|
++ optional enablePluginNotificationSounds libcanberra-gtk2
|
2014-09-29 21:21:56 +01:00
|
|
|
++ optional enablePluginNotificationDialogs libnotify
|
|
|
|
++ optional enablePluginFancy libsoup
|
|
|
|
++ optional enablePluginRssyl libxml2
|
|
|
|
++ optional enableNetworkManager networkmanager
|
|
|
|
++ optional enableLdap openldap
|
|
|
|
++ optional enablePluginPdf poppler
|
2017-05-26 14:43:25 +01:00
|
|
|
++ optional enablePluginFancy webkitgtk24x-gtk2;
|
2014-09-29 21:21:56 +01:00
|
|
|
|
|
|
|
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"
|
2018-04-16 01:22:22 +01:00
|
|
|
++ optional (!enablePluginPython) "--disable-python-plugin"
|
2014-09-29 21:21:56 +01:00
|
|
|
++ 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";
|
2015-09-12 07:07:31 +01:00
|
|
|
|
2015-09-18 12:20:27 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-04-16 01:22:22 +01:00
|
|
|
pythonPath = with python.pkgs; [ pygobject2 pygtk ];
|
|
|
|
|
2015-12-13 15:34:31 +00:00
|
|
|
preFixup = ''
|
2018-04-16 01:22:22 +01:00
|
|
|
buildPythonPath "$out $pythonPath"
|
|
|
|
gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "${shared-mime-info}/share" --prefix PYTHONPATH : "$program_PYTHONPATH")
|
2015-12-13 15:34:31 +00:00
|
|
|
'';
|
2015-10-21 06:23:01 +01:00
|
|
|
|
2015-09-12 07:07:31 +01:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
cp claws-mail.desktop $out/share/applications
|
|
|
|
'';
|
2017-02-02 18:15:10 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "The user-friendly, lightweight, and fast email client";
|
2018-06-23 12:34:55 +01:00
|
|
|
homepage = https://www.claws-mail.org/;
|
2017-02-02 18:15:10 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
2018-03-03 02:10:24 +00:00
|
|
|
maintainers = with maintainers; [ fpletz globin ];
|
2017-02-02 18:15:10 +00:00
|
|
|
};
|
2014-09-29 21:21:56 +01:00
|
|
|
}
|