mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 15:41:40 +00:00
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
|
||||
, enableRST ? true
|
||||
, enableSpelling ? true, gtkspell ? null
|
||||
, enableLaTeX ? false, texLive ? 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 enableRST -> pythonPackages.docutils != null;
|
||||
assert enableSpelling -> gtkspell != null;
|
||||
assert enableLaTeX -> texLive != null;
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
|
@ -53,6 +55,11 @@ stdenv.mkDerivation rec {
|
|||
'' + optionalString enableSpelling ''
|
||||
sed -i -e 's|=.*find_lib.*|= "${gtkspell}/lib/libgtkspell.so"|' \
|
||||
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 = [
|
||||
|
@ -63,7 +70,8 @@ stdenv.mkDerivation rec {
|
|||
pyopenssl pythonDBus
|
||||
] ++ optionals enableJingle [ farstream gst_plugins_bad libnice ]
|
||||
++ optional enableE2E pythonPackages.pycrypto
|
||||
++ optional enableRST pythonPackages.docutils;
|
||||
++ optional enableRST pythonPackages.docutils
|
||||
++ optional enableLaTeX texLive;
|
||||
|
||||
postInstall = ''
|
||||
install -m 644 -t "$out/share/gajim/icons/hicolor" \
|
||||
|
|
Loading…
Reference in a new issue