@@ -0,0 +1,45 @@
1+{ stdenv, fetchzip, python2Packages }:
2+
3+python2Packages.buildPythonApplication rec {
4+ name = "pygmentex-${version}";
5+ version = "0.8";
6+
7+ src = fetchzip {
8+ url = "http://mirrors.ctan.org/macros/latex/contrib/pygmentex.zip";
9+ sha256 = "1nm19pvhlv51mv2sdankndhw64ys9r7ch6szzd6i4jz8zr86kn9v";
10+ };
11+
12+ pythonPath = [ python2Packages.pygments python2Packages.chardet ];
13+
14+ buildPhase = ":";
15+
16+ doCheck = false;
17+
18+ installPhase = ''
19+
20+ mkdir -p $out/bin
21+ cp -a pygmentex.py $out/bin
22+ '';
23+
24+ meta = with stdenv.lib; {
25+ homepage = https://www.ctan.org/pkg/pygmentex;
26+ description = "Auxiliary tool for typesetting code listings in LaTeX documents using Pygments";
27+ longDescription = ''
28+ PygmenTeX is a Python-based LaTeX package that can be used for
29+ typesetting code listings in a LaTeX document using Pygments.
30+
31+ Pygments is a generic syntax highlighter for general use in all kinds of
32+ software such as forum systems, wikis or other applications that need to
33+ prettify source code.
34+
35+ This package installs just the script needed to process code listings
36+ snippets extracted from the a LaTeX document by the pygmentex LaTeX
37+ package. In order to use it effectivelly the texlive package pygmentex
38+ also has to be installed. This can be done by adding pygmentex to
39+ texlive.combine.
40+ '';
41+ license = licenses.lppl13c;
42+ maintainers = with maintainers; [ romildo ];
43+ platforms = platforms.unix;
44+ };
45+}