2015-10-21 07:23:01 +02:00
|
|
|
{ fetchurl, stdenv, wrapGAppsHook
|
2016-09-11 23:24:51 +02:00
|
|
|
, curl, dbus, dbus_glib, enchant, gtk2, gnutls, gnupg, gpgme, hicolor_icon_theme
|
|
|
|
, libarchive, libcanberra_gtk2, libetpan, libnotify, libsoup, libxml2, networkmanager
|
2017-05-26 15:43:25 +02:00
|
|
|
, openldap , perl, pkgconfig, poppler, python, shared_mime_info, webkitgtk24x-gtk2
|
2017-04-24 20:23:44 +02:00
|
|
|
, glib_networking, gsettings_desktop_schemas, libSM, libytnef
|
2014-09-29 22:21:56 +02: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
|
|
|
|
# python requires python
|
|
|
|
, enableLdap ? false
|
|
|
|
, enableNetworkManager ? false
|
2015-12-12 13:31:07 +01:00
|
|
|
, enablePgp ? true
|
2014-09-29 22:21:56 +02:00
|
|
|
, enablePluginArchive ? false
|
|
|
|
, enablePluginFancy ? false
|
|
|
|
, enablePluginNotificationDialogs ? true
|
|
|
|
, enablePluginNotificationSounds ? true
|
|
|
|
, enablePluginPdf ? false
|
|
|
|
, enablePluginRavatar ? false
|
|
|
|
, enablePluginRssyl ? false
|
|
|
|
, enablePluginSmime ? false
|
|
|
|
, enablePluginSpamassassin ? false
|
|
|
|
, enablePluginSpamReport ? false
|
|
|
|
, enablePluginVcalendar ? false
|
|
|
|
, enableSpellcheck ? false
|
|
|
|
}:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
2016-01-30 21:08:09 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2014-09-29 22:21:56 +02:00
|
|
|
name = "claws-mail-${version}";
|
2017-09-18 21:42:20 +02:00
|
|
|
version = "3.15.1";
|
2014-09-29 22:21:56 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-10-03 12:42:50 +02:00
|
|
|
url = "http://www.claws-mail.org/download.php?file=releases/claws-mail-${version}.tar.xz";
|
2017-09-18 21:42:20 +02:00
|
|
|
sha256 = "0hlm2jipyr4z6izlrpvabpz4ivh49i13avnm848kr1nv68pkq2cd";
|
2014-09-29 22:21:56 +02:00
|
|
|
};
|
|
|
|
|
2017-10-28 11:22:26 +02:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2015-09-18 13:20:16 +02:00
|
|
|
patches = [ ./mime.patch ];
|
|
|
|
|
2017-04-24 20:23:44 +02:00
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2015-09-27 20:33:37 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/procmime.c \
|
|
|
|
--subst-var-by MIMEROOTDIR ${shared_mime_info}/share
|
|
|
|
'';
|
|
|
|
|
2017-04-24 20:23:44 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig wrapGAppsHook ];
|
|
|
|
|
2014-09-29 22:21:56 +02:00
|
|
|
buildInputs =
|
2016-09-11 23:24:51 +02:00
|
|
|
[ curl dbus dbus_glib gtk2 gnutls gsettings_desktop_schemas hicolor_icon_theme
|
2017-04-24 20:23:44 +02:00
|
|
|
libetpan perl python glib_networking libSM libytnef
|
2015-09-30 10:31:45 +02:00
|
|
|
]
|
2014-09-29 22:21:56 +02:00
|
|
|
++ optional enableSpellcheck enchant
|
|
|
|
++ optionals (enablePgp || enablePluginSmime) [ gnupg gpgme ]
|
|
|
|
++ optional enablePluginArchive libarchive
|
2016-09-11 23:24:51 +02:00
|
|
|
++ optional enablePluginNotificationSounds libcanberra_gtk2
|
2014-09-29 22:21:56 +02:00
|
|
|
++ optional enablePluginNotificationDialogs libnotify
|
|
|
|
++ optional enablePluginFancy libsoup
|
|
|
|
++ optional enablePluginRssyl libxml2
|
|
|
|
++ optional enableNetworkManager networkmanager
|
|
|
|
++ optional enableLdap openldap
|
|
|
|
++ optional enablePluginPdf poppler
|
2017-05-26 15:43:25 +02:00
|
|
|
++ optional enablePluginFancy webkitgtk24x-gtk2;
|
2014-09-29 22:21:56 +02: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"
|
|
|
|
++ 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 08:07:31 +02:00
|
|
|
|
2015-09-18 13:20:27 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2015-12-13 16:34:31 +01:00
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "${shared_mime_info}/share")
|
|
|
|
'';
|
2015-10-21 07:23:01 +02:00
|
|
|
|
2015-09-12 08:07:31 +02:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
cp claws-mail.desktop $out/share/applications
|
|
|
|
'';
|
2017-02-02 19:15:10 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "The user-friendly, lightweight, and fast email client";
|
|
|
|
homepage = http://www.claws-mail.org/;
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ khumba fpletz globin ];
|
|
|
|
};
|
2014-09-29 22:21:56 +02:00
|
|
|
}
|