2020-10-01 23:05:04 +02:00
|
|
|
{ config, fetchurl, stdenv, wrapGAppsHook, autoreconfHook
|
2020-04-17 05:42:57 +02:00
|
|
|
, curl, dbus, dbus-glib, enchant, gtk2, gnutls, gnupg, gpgme, gumbo
|
2018-02-25 03:23:58 +01:00
|
|
|
, libarchive, libcanberra-gtk2, libetpan, libnotify, libsoup, libxml2, networkmanager
|
2019-12-05 11:01:16 +01:00
|
|
|
, openldap, perl, pkgconfig, poppler, python, shared-mime-info
|
2019-09-12 16:25:05 +02:00
|
|
|
, glib-networking, gsettings-desktop-schemas, libSM, libytnef, libical
|
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
|
|
|
|
, enableLdap ? false
|
2019-02-03 16:33:36 +01:00
|
|
|
, enableNetworkManager ? config.networking.networkmanager.enable or false
|
2015-12-12 13:31:07 +01:00
|
|
|
, enablePgp ? true
|
2014-09-29 22:21:56 +02:00
|
|
|
, enablePluginArchive ? false
|
2020-04-17 05:42:57 +02:00
|
|
|
, enablePluginLitehtmlViewer ? false
|
2014-09-29 22:21:56 +02:00
|
|
|
, enablePluginNotificationDialogs ? true
|
|
|
|
, enablePluginNotificationSounds ? true
|
|
|
|
, enablePluginPdf ? false
|
2018-04-16 02:22:22 +02:00
|
|
|
, enablePluginPython ? false
|
2014-09-29 22:21:56 +02:00
|
|
|
, 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 {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "claws-mail";
|
2020-10-01 23:05:04 +02:00
|
|
|
version = "3.17.7";
|
2014-09-29 22:21:56 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-10-01 23:05:04 +02:00
|
|
|
url = "https://www.claws-mail.org/download.php?file=releases/claws-mail-${version}.tar.xz";
|
|
|
|
sha256 = "1j6x09621wng0lavh53nwzh9vqjzpspl8kh5azh7kbihpi4ldfb0";
|
2014-09-29 22:21:56 +02:00
|
|
|
};
|
|
|
|
|
2017-10-28 11:22:26 +02:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2020-08-19 14:29:23 +02:00
|
|
|
patches = [
|
|
|
|
./mime.patch
|
|
|
|
];
|
2015-09-18 13:20:16 +02:00
|
|
|
|
2018-04-16 02:22:22 +02:00
|
|
|
preConfigure = ''
|
|
|
|
# autotools check tries to dlopen libpython as a requirement for the python plugin
|
2020-01-02 01:29:34 +01:00
|
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${python}/lib
|
2018-04-16 02:22:22 +02:00
|
|
|
'';
|
|
|
|
|
2015-09-27 20:33:37 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/procmime.c \
|
2018-02-25 03:23:58 +01:00
|
|
|
--subst-var-by MIMEROOTDIR ${shared-mime-info}/share
|
2015-09-27 20:33:37 +02:00
|
|
|
'';
|
|
|
|
|
2018-04-16 02:22:22 +02:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig wrapGAppsHook python.pkgs.wrapPython ];
|
|
|
|
propagatedBuildInputs = with python.pkgs; [ python ] ++ optionals enablePluginPython [ pygtk pygobject2 ];
|
2017-04-24 20:23:44 +02:00
|
|
|
|
2014-09-29 22:21:56 +02:00
|
|
|
buildInputs =
|
2019-09-12 16:25:05 +02:00
|
|
|
[ curl dbus dbus-glib gtk2 gnutls gsettings-desktop-schemas
|
2018-04-16 02:22:22 +02:00
|
|
|
libetpan perl 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
|
2018-02-25 03:23:58 +01:00
|
|
|
++ optional enablePluginNotificationSounds libcanberra-gtk2
|
2014-09-29 22:21:56 +02:00
|
|
|
++ optional enablePluginNotificationDialogs libnotify
|
2020-04-17 05:42:57 +02:00
|
|
|
++ optional enablePluginLitehtmlViewer gumbo
|
2014-09-29 22:21:56 +02:00
|
|
|
++ optional enablePluginRssyl libxml2
|
|
|
|
++ optional enableNetworkManager networkmanager
|
|
|
|
++ optional enableLdap openldap
|
|
|
|
++ optional enablePluginPdf poppler
|
2019-03-07 16:41:46 +01:00
|
|
|
++ optional enablePluginVcalendar libical;
|
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"
|
2020-04-17 05:42:57 +02:00
|
|
|
++ optional (!enablePluginLitehtmlViewer) "--disable-litehtml_viewer-plugin"
|
2014-09-29 22:21:56 +02:00
|
|
|
++ optional (!enablePluginPdf) "--disable-pdf_viewer-plugin"
|
2018-04-16 02:22:22 +02:00
|
|
|
++ optional (!enablePluginPython) "--disable-python-plugin"
|
2014-09-29 22:21:56 +02: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 08:07:31 +02:00
|
|
|
|
2015-09-18 13:20:27 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-04-16 02:22:22 +02:00
|
|
|
pythonPath = with python.pkgs; [ pygobject2 pygtk ];
|
|
|
|
|
2015-12-13 16:34:31 +01:00
|
|
|
preFixup = ''
|
2018-04-16 02:22:22 +02:00
|
|
|
buildPythonPath "$out $pythonPath"
|
|
|
|
gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "${shared-mime-info}/share" --prefix PYTHONPATH : "$program_PYTHONPATH")
|
2015-12-13 16:34:31 +01:00
|
|
|
'';
|
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";
|
2020-02-25 22:52:09 +01:00
|
|
|
homepage = "https://www.claws-mail.org/";
|
2017-02-02 19:15:10 +01:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
2020-03-13 14:45:08 +01:00
|
|
|
maintainers = with maintainers; [ fpletz globin orivej ];
|
2017-02-02 19:15:10 +01:00
|
|
|
};
|
2014-09-29 22:21:56 +02:00
|
|
|
}
|