2013-05-25 03:18:08 +00:00
|
|
|
{ stdenv, fetchurl, python, intltool, pkgconfig, libX11, gtk
|
2013-05-27 05:42:38 +00:00
|
|
|
, ldns, pyopenssl, pythonDBus, pythonPackages
|
2013-05-25 03:18:08 +00:00
|
|
|
|
|
|
|
, enableJingle ? true, farstream ? null, gst_plugins_bad ? null
|
|
|
|
, libnice ? null
|
|
|
|
, enableE2E ? true
|
|
|
|
, enableRST ? true
|
|
|
|
, enableSpelling ? true, gtkspell ? null
|
2013-05-27 08:09:24 +00:00
|
|
|
, enableNotifications ? false
|
2013-05-27 07:36:13 +00:00
|
|
|
, enableLaTeX ? false, texLive ? null
|
2013-05-25 03:18:08 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert enableJingle -> farstream != null && gst_plugins_bad != null
|
|
|
|
&& libnice != null;
|
|
|
|
assert enableE2E -> pythonPackages.pycrypto != null;
|
|
|
|
assert enableRST -> pythonPackages.docutils != null;
|
|
|
|
assert enableSpelling -> gtkspell != null;
|
2013-05-27 08:09:24 +00:00
|
|
|
assert enableNotifications -> pythonPackages.notify != null;
|
2013-05-27 07:36:13 +00:00
|
|
|
assert enableLaTeX -> texLive != null;
|
2013-05-25 03:18:08 +00:00
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "gajim-${version}";
|
2014-10-07 12:23:15 +00:00
|
|
|
version = "0.16";
|
2013-05-25 03:18:08 +00:00
|
|
|
|
2009-04-12 19:34:20 +00:00
|
|
|
src = fetchurl {
|
2014-10-07 12:23:15 +00:00
|
|
|
url = "http://www.gajim.org/downloads/0.16/gajim-${version}.tar.bz2";
|
|
|
|
sha256 = "14x15jwgl0c6vwj02ccpzmxr3fczp632mnj50cpklbaj4bxqvgbs";
|
2009-04-12 19:34:20 +00:00
|
|
|
};
|
|
|
|
|
2013-05-27 05:42:38 +00:00
|
|
|
patches = [
|
|
|
|
(fetchurl {
|
|
|
|
name = "gajim-icon-index.patch";
|
|
|
|
url = "http://hg.gajim.org/gajim/raw-rev/b9ec78663dfb";
|
|
|
|
sha256 = "0w54hr5dq9y36val55kmh8d6cid7h4fs2nghx09714jylz2nyxxv";
|
|
|
|
})
|
|
|
|
];
|
2013-05-25 03:18:08 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i -e '0,/^[^#]/ {
|
|
|
|
/^[^#]/i export \\\
|
|
|
|
PYTHONPATH="'"$PYTHONPATH\''${PYTHONPATH:+:}\$PYTHONPATH"'" \\\
|
|
|
|
GST_PLUGIN_PATH="'"\$GST_PLUGIN_PATH''${GST_PLUGIN_PATH:+:}${""
|
|
|
|
}$GST_PLUGIN_PATH"'"
|
|
|
|
}' scripts/gajim.in
|
|
|
|
|
|
|
|
sed -i -e 's/return helpers.is_in_path('"'"'drill.*/return True/' \
|
|
|
|
src/features_window.py
|
|
|
|
sed -i -e "s|'drill'|'${ldns}/bin/drill'|" src/common/resolver.py
|
|
|
|
'' + optionalString enableSpelling ''
|
|
|
|
sed -i -e 's|=.*find_lib.*|= "${gtkspell}/lib/libgtkspell.so"|' \
|
|
|
|
src/gtkspell.py
|
2013-05-27 07:36:13 +00:00
|
|
|
'' + optionalString enableLaTeX ''
|
|
|
|
sed -i -e "s|try_run(.'dvipng'|try_run(['${texLive}/bin/dvipng'|" \
|
|
|
|
-e "s|try_run(.'latex'|try_run(['${texLive}/bin/latex'|" \
|
|
|
|
-e 's/tmpfd.close()/os.close(tmpfd)/' \
|
|
|
|
src/common/latex.py
|
2013-05-25 03:18:08 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
python intltool pkgconfig libX11
|
|
|
|
pythonPackages.pygobject pythonPackages.pyGtkGlade
|
|
|
|
pythonPackages.sqlite3 pythonPackages.pyasn1
|
|
|
|
pythonPackages.pyxdg
|
2014-10-07 12:23:15 +00:00
|
|
|
pythonPackages.nbxmpp
|
2013-05-25 03:18:08 +00:00
|
|
|
pyopenssl pythonDBus
|
|
|
|
] ++ optionals enableJingle [ farstream gst_plugins_bad libnice ]
|
|
|
|
++ optional enableE2E pythonPackages.pycrypto
|
2013-05-27 07:36:13 +00:00
|
|
|
++ optional enableRST pythonPackages.docutils
|
2013-05-27 08:09:24 +00:00
|
|
|
++ optional enableNotifications pythonPackages.notify
|
2013-05-27 07:36:13 +00:00
|
|
|
++ optional enableLaTeX texLive;
|
2013-05-25 03:18:08 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -m 644 -t "$out/share/gajim/icons/hicolor" \
|
|
|
|
"icons/hicolor/index.theme"
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2009-04-12 19:34:20 +00:00
|
|
|
meta = {
|
2013-05-25 03:18:08 +00:00
|
|
|
homepage = "http://gajim.org/";
|
|
|
|
description = "Jabber client written in PyGTK";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.raskin maintainers.aszlig ];
|
2014-10-07 12:23:15 +00:00
|
|
|
downloadPage = "http://gajim.org/downloads.php";
|
|
|
|
updateWalker = true;
|
2009-04-12 19:34:20 +00:00
|
|
|
};
|
|
|
|
}
|