diff options
author | aszlig <aszlig@redmoonstudios.org> | 2013-05-27 09:36:13 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2013-05-27 10:18:00 +0200 |
commit | f273e7629e5b1ce047418359a61efe90fae88b81 (patch) | |
tree | 80e4ad368563815d938d5dc981b3976846285bea | |
parent | bdedaae691dcf0661595fc1fe10dd7ae5972bf6b (diff) | |
download | nixlib-f273e7629e5b1ce047418359a61efe90fae88b81.tar nixlib-f273e7629e5b1ce047418359a61efe90fae88b81.tar.gz nixlib-f273e7629e5b1ce047418359a61efe90fae88b81.tar.bz2 nixlib-f273e7629e5b1ce047418359a61efe90fae88b81.tar.lz nixlib-f273e7629e5b1ce047418359a61efe90fae88b81.tar.xz nixlib-f273e7629e5b1ce047418359a61efe90fae88b81.tar.zst nixlib-f273e7629e5b1ce047418359a61efe90fae88b81.zip |
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>
-rw-r--r-- | pkgs/applications/networking/instant-messengers/gajim/default.nix | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/applications/networking/instant-messengers/gajim/default.nix b/pkgs/applications/networking/instant-messengers/gajim/default.nix index c8c3f3b7d2a0..3c3cc5ccdfce 100644 --- a/pkgs/applications/networking/instant-messengers/gajim/default.nix +++ b/pkgs/applications/networking/instant-messengers/gajim/default.nix @@ -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" \ |