Merge pull request #41357 from ajs124/claws_mail_python
claws-mail: add support for python plugin
This commit is contained in:
commit
5db9181fa1
@ -1,7 +1,7 @@
|
|||||||
{ fetchurl, stdenv, wrapGAppsHook
|
{ fetchurl, stdenv, wrapGAppsHook, autoreconfHook
|
||||||
, curl, dbus, dbus-glib, enchant, gtk2, gnutls, gnupg, gpgme, hicolor-icon-theme
|
, curl, dbus, dbus-glib, enchant, gtk2, gnutls, gnupg, gpgme, hicolor-icon-theme
|
||||||
, libarchive, libcanberra-gtk2, libetpan, libnotify, libsoup, libxml2, networkmanager
|
, libarchive, libcanberra-gtk2, libetpan, libnotify, libsoup, libxml2, networkmanager
|
||||||
, openldap , perl, pkgconfig, poppler, python, shared-mime-info, webkitgtk24x-gtk2
|
, openldap, perl, pkgconfig, poppler, python, shared-mime-info, webkitgtk24x-gtk2
|
||||||
, glib-networking, gsettings-desktop-schemas, libSM, libytnef
|
, glib-networking, gsettings-desktop-schemas, libSM, libytnef
|
||||||
|
|
||||||
# Build options
|
# Build options
|
||||||
@ -10,7 +10,6 @@
|
|||||||
# provided:
|
# provided:
|
||||||
# gdata requires libgdata
|
# gdata requires libgdata
|
||||||
# geolocation requires libchamplain
|
# geolocation requires libchamplain
|
||||||
# python requires python
|
|
||||||
, enableLdap ? false
|
, enableLdap ? false
|
||||||
, enableNetworkManager ? false
|
, enableNetworkManager ? false
|
||||||
, enablePgp ? true
|
, enablePgp ? true
|
||||||
@ -19,6 +18,7 @@
|
|||||||
, enablePluginNotificationDialogs ? true
|
, enablePluginNotificationDialogs ? true
|
||||||
, enablePluginNotificationSounds ? true
|
, enablePluginNotificationSounds ? true
|
||||||
, enablePluginPdf ? false
|
, enablePluginPdf ? false
|
||||||
|
, enablePluginPython ? false
|
||||||
, enablePluginRavatar ? false
|
, enablePluginRavatar ? false
|
||||||
, enablePluginRssyl ? false
|
, enablePluginRssyl ? false
|
||||||
, enablePluginSmime ? false
|
, enablePluginSmime ? false
|
||||||
@ -43,16 +43,22 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
patches = [ ./mime.patch ];
|
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 = ''
|
postPatch = ''
|
||||||
substituteInPlace src/procmime.c \
|
substituteInPlace src/procmime.c \
|
||||||
--subst-var-by MIMEROOTDIR ${shared-mime-info}/share
|
--subst-var-by MIMEROOTDIR ${shared-mime-info}/share
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig wrapGAppsHook ];
|
nativeBuildInputs = [ autoreconfHook pkgconfig wrapGAppsHook python.pkgs.wrapPython ];
|
||||||
|
propagatedBuildInputs = with python.pkgs; [ python ] ++ optionals enablePluginPython [ pygtk pygobject2 ];
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ curl dbus dbus-glib gtk2 gnutls gsettings-desktop-schemas hicolor-icon-theme
|
[ curl dbus dbus-glib gtk2 gnutls gsettings-desktop-schemas hicolor-icon-theme
|
||||||
libetpan perl python glib-networking libSM libytnef
|
libetpan perl glib-networking libSM libytnef
|
||||||
]
|
]
|
||||||
++ optional enableSpellcheck enchant
|
++ optional enableSpellcheck enchant
|
||||||
++ optionals (enablePgp || enablePluginSmime) [ gnupg gpgme ]
|
++ optionals (enablePgp || enablePluginSmime) [ gnupg gpgme ]
|
||||||
@ -77,6 +83,7 @@ stdenv.mkDerivation rec {
|
|||||||
++ optional (!enablePluginArchive) "--disable-archive-plugin"
|
++ optional (!enablePluginArchive) "--disable-archive-plugin"
|
||||||
++ optional (!enablePluginFancy) "--disable-fancy-plugin"
|
++ optional (!enablePluginFancy) "--disable-fancy-plugin"
|
||||||
++ optional (!enablePluginPdf) "--disable-pdf_viewer-plugin"
|
++ optional (!enablePluginPdf) "--disable-pdf_viewer-plugin"
|
||||||
|
++ optional (!enablePluginPython) "--disable-python-plugin"
|
||||||
++ optional (!enablePluginRavatar) "--disable-libravatar-plugin"
|
++ optional (!enablePluginRavatar) "--disable-libravatar-plugin"
|
||||||
++ optional (!enablePluginRssyl) "--disable-rssyl-plugin"
|
++ optional (!enablePluginRssyl) "--disable-rssyl-plugin"
|
||||||
++ optional (!enablePluginSmime) "--disable-smime-plugin"
|
++ optional (!enablePluginSmime) "--disable-smime-plugin"
|
||||||
@ -87,8 +94,11 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
pythonPath = with python.pkgs; [ pygobject2 pygtk ];
|
||||||
|
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "${shared-mime-info}/share")
|
buildPythonPath "$out $pythonPath"
|
||||||
|
gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "${shared-mime-info}/share" --prefix PYTHONPATH : "$program_PYTHONPATH")
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user