gajim: Add support for LaTeX markup.
This needed a bit of patching the paths to the latex and dvipng executables. In addition, we also address a small bug by using sed: tmpfd, tmppng = mkstemp(prefix='gajim_tex', suffix='.png') tmpfd.close() This obviously won't work, because mkstemp() actually returns a file descriptor _number_ and not a Python file object. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
bdedaae691
commit
f273e7629e
@ -6,6 +6,7 @@
|
|||||||
, enableE2E ? true
|
, enableE2E ? true
|
||||||
, enableRST ? true
|
, enableRST ? true
|
||||||
, enableSpelling ? true, gtkspell ? null
|
, enableSpelling ? true, gtkspell ? null
|
||||||
|
, enableLaTeX ? false, texLive ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert enableJingle -> farstream != null && gst_plugins_bad != null
|
assert enableJingle -> farstream != null && gst_plugins_bad != null
|
||||||
@ -13,6 +14,7 @@ assert enableJingle -> farstream != null && gst_plugins_bad != null
|
|||||||
assert enableE2E -> pythonPackages.pycrypto != null;
|
assert enableE2E -> pythonPackages.pycrypto != null;
|
||||||
assert enableRST -> pythonPackages.docutils != null;
|
assert enableRST -> pythonPackages.docutils != null;
|
||||||
assert enableSpelling -> gtkspell != null;
|
assert enableSpelling -> gtkspell != null;
|
||||||
|
assert enableLaTeX -> texLive != null;
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
@ -53,6 +55,11 @@ stdenv.mkDerivation rec {
|
|||||||
'' + optionalString enableSpelling ''
|
'' + optionalString enableSpelling ''
|
||||||
sed -i -e 's|=.*find_lib.*|= "${gtkspell}/lib/libgtkspell.so"|' \
|
sed -i -e 's|=.*find_lib.*|= "${gtkspell}/lib/libgtkspell.so"|' \
|
||||||
src/gtkspell.py
|
src/gtkspell.py
|
||||||
|
'' + 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
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
@ -63,7 +70,8 @@ stdenv.mkDerivation rec {
|
|||||||
pyopenssl pythonDBus
|
pyopenssl pythonDBus
|
||||||
] ++ optionals enableJingle [ farstream gst_plugins_bad libnice ]
|
] ++ optionals enableJingle [ farstream gst_plugins_bad libnice ]
|
||||||
++ optional enableE2E pythonPackages.pycrypto
|
++ optional enableE2E pythonPackages.pycrypto
|
||||||
++ optional enableRST pythonPackages.docutils;
|
++ optional enableRST pythonPackages.docutils
|
||||||
|
++ optional enableLaTeX texLive;
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
install -m 644 -t "$out/share/gajim/icons/hicolor" \
|
install -m 644 -t "$out/share/gajim/icons/hicolor" \
|
||||||
|
Loading…
Reference in New Issue
Block a user