diff options
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-latex/default.nix')
-rw-r--r-- | pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-latex/default.nix | 56 |
1 files changed, 21 insertions, 35 deletions
diff --git a/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-latex/default.nix b/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-latex/default.nix index ba3f041738a..c9b8a959bf9 100644 --- a/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-latex/default.nix +++ b/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-latex/default.nix @@ -1,46 +1,32 @@ -{ stdenv, fetchurl, pidgin, imagemagick, ghostscript -, pkgconfig, glib, gtk, texLive -}: - +{ stdenv, fetchurl, pkgconfig, pidgin, texLive, imagemagick, glib, gtk }: + +let version = "1.5.0"; +in stdenv.mkDerivation { - name = "pidgin-latex"; + name = "pidgin-latex-${version}"; src = fetchurl { - url = http://tapas.affenbande.org/pidgin-latex/pidgin-latex-0.9.tgz; - sha256 = "1yqd3qgxd3n8hm60qg7yv7j1crr6f3d4yrdpgwdpw2pyf92p8nxp"; + url = "mirror://sourceforge/pidgin-latex/pidgin-latex_${version}.tar.bz2"; + sha256 = "9c850aee90d7e59de834f83e09fa6e3e51b123f06e265ead70957608ada95441"; }; - preBuild = '' - sed -e '/^PREFIX/d' -i Makefile ; - sed -e 's@/usr/bin/latex@${texLive}/bin/pdflatex@g' -i pidgin-latex.h - 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 - sed -e 's/latex_system\(.*\)FALSE/latex_system\1TRUE/' -i pidgin-latex.c - ''; - - makeFlags = "PREFIX=\$(out)"; + nativeBuildInputs = [pkgconfig]; + buildInputs = [gtk glib pidgin]; + 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/ + postPatch = '' + sed -e 's/-Wl,-soname//' -i Makefile ''; - buildInputs = [pidgin imagemagick ghostscript pkgconfig glib gtk texLive]; + passthru = { + wrapArgs = "--prefix PATH ':' ${texLive}/bin:${imagemagick}/bin"; + }; - meta = { - longDescription = '' - 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. - ''; - homepage = http://tapas.affenbande.org/wordpress/?page_id=70; + meta = with stdenv.lib; { + homepage = http://sourceforge.net/projects/pidgin-latex/; + description = "LaTeX rendering plugin for Pidgin IM"; + licenses = licenses.gpl2; + platforms = platforms.linux; + maintainers = maintainers.abbradar; }; } |