2007-07-07 20:22:28 +01:00
|
|
|
{stdenv, fetchurl, pidgin, imagemagick, ghostscript,
|
2008-04-18 21:23:26 +01:00
|
|
|
pkgconfig, glib, gtk, texLive}:
|
2007-07-07 20:22:28 +01:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "pidgin-latex";
|
|
|
|
|
2007-11-11 07:54:45 +00:00
|
|
|
src =
|
|
|
|
fetchurl {
|
|
|
|
url = http://tapas.affenbande.org/pidgin-latex/pidgin-latex-0.9.tgz;
|
|
|
|
sha256 = "1yqd3qgxd3n8hm60qg7yv7j1crr6f3d4yrdpgwdpw2pyf92p8nxp";
|
|
|
|
};
|
2007-07-07 20:22:28 +01:00
|
|
|
|
2007-11-11 07:54:45 +00:00
|
|
|
preBuild = "
|
|
|
|
sed -e '/^PREFIX/d' -i Makefile ;
|
2008-04-18 21:23:26 +01:00
|
|
|
sed -e 's@/usr/bin/latex@${texLive}/bin/pdflatex@g' -i pidgin-latex.h
|
2007-11-11 07:54:45 +00:00
|
|
|
sed -e 's@/usr/bin/convert@${imagemagick}/bin/convert@g' -i pidgin-latex.h
|
|
|
|
sed -e 's@.*convert_path.*@const gchar *convert = CONVERT_PATH;@'
|
|
|
|
sed -e 's@.*latex_path.*@const gchar *convert = LATEX_PATH;@'
|
|
|
|
sed -e 's/%s.dvi/%s.pdf/' -i pidgin-latex.c
|
2008-04-24 18:00:28 +01:00
|
|
|
sed -e 's/latex_system\(.*\)FALSE/latex_system\1TRUE/' -i pidgin-latex.c
|
2007-11-11 07:54:45 +00:00
|
|
|
";
|
2007-07-07 20:22:28 +01:00
|
|
|
|
|
|
|
makeFlags="PREFIX=\$(out)";
|
|
|
|
|
|
|
|
preInstall="mkdir -p \${out}/lib/pidgin \${out}/bin";
|
|
|
|
|
|
|
|
postInstall = "mkdir -p \${out}/share/pidgin-latex;
|
|
|
|
ln -s \${out}/lib/pidgin/pidgin-latex.so \${out}/share/pidgin-latex/";
|
|
|
|
|
2008-04-18 21:23:26 +01:00
|
|
|
buildInputs = [pidgin imagemagick ghostscript pkgconfig glib gtk texLive];
|
2007-07-07 20:22:28 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "
|
|
|
|
Pidgin-LaTeX is a pidgin plugin that cuts everything inside \$\$ .. \$\$
|
|
|
|
and feeds to LaTeX. A bit of conversion (automated, of course) - and you
|
|
|
|
see every formula that occurs in conversation in pretty graphical form.
|
|
|
|
There are some glitches - when a formula fails to compile, you can see
|
|
|
|
just previous formula..
|
|
|
|
Enable it for user by linking to ~/.purple/plugins - from
|
|
|
|
sw/share/pidgin-latex , not from store of course.
|
|
|
|
";
|
2008-01-30 19:49:42 +00:00
|
|
|
homepage = http://tapas.affenbande.org/wordpress/?page_id=70;
|
2007-07-07 20:22:28 +01:00
|
|
|
};
|
|
|
|
}
|