Merge pull request #75730 from veprbl/pr/texlive_bin_pygmentex
texlive: provide a working pygmentex executable
This commit is contained in:
commit
7891f3d706
4 changed files with 39 additions and 59 deletions
|
@ -1,56 +0,0 @@
|
|||
{ stdenv, fetchFromBitbucket, python2Packages }:
|
||||
|
||||
python2Packages.buildPythonApplication rec {
|
||||
pname = "pygmentex";
|
||||
version = "0.8";
|
||||
tlType = "run";
|
||||
|
||||
src = fetchFromBitbucket {
|
||||
owner = "romildo";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "07dnv7hgppy15bda2kcbrlvfqzl6lhza80klc7133dwg8q92hm6m";
|
||||
};
|
||||
|
||||
pythonPath = with python2Packages; [ pygments chardet ];
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
doCheck = false;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -a pygmentex.py $out/bin
|
||||
|
||||
mkdir -p $out/scripts/pygmentex
|
||||
ln -s $out/bin/pygmentex.py $out/scripts/pygmentex
|
||||
|
||||
mkdir -p $out/tex/latex/pygmentex
|
||||
cp -a pygmentex.sty $out/tex/latex/pygmentex
|
||||
|
||||
mkdir -p $out/doc/latex/pygmentex
|
||||
cp -a README demo.* blueshade.png Factorial.java $out/doc/latex/pygmentex
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://www.ctan.org/pkg/pygmentex;
|
||||
description = "Auxiliary tool for typesetting code listings in LaTeX documents using Pygments";
|
||||
longDescription = ''
|
||||
PygmenTeX is a Python-based LaTeX package that can be used for
|
||||
typesetting code listings in a LaTeX document using Pygments.
|
||||
|
||||
Pygments is a generic syntax highlighter for general use in all kinds of
|
||||
software such as forum systems, wikis or other applications that need to
|
||||
prettify source code.
|
||||
|
||||
This package installs just the script needed to process code listings
|
||||
snippets extracted from the a LaTeX document by the pygmentex LaTeX
|
||||
package. In order to use it effectivelly the texlive package pygmentex
|
||||
also has to be installed. This can be done by adding pygmentex to
|
||||
texlive.combine.
|
||||
'';
|
||||
license = licenses.lppl13c;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ romildo ];
|
||||
};
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
, texlive
|
||||
, zlib, libiconv, libpng, libX11
|
||||
, freetype, gd, libXaw, icu, ghostscript, libXpm, libXmu, libXext
|
||||
, perl, perlPackages, pkgconfig, autoreconfHook
|
||||
, perl, perlPackages, python2Packages, pkgconfig, autoreconfHook
|
||||
, poppler, libpaper, graphite2, zziplib, harfbuzz, potrace, gmp, mpfr
|
||||
, cairo, pixman, xorg, clisp, biber, xxHash
|
||||
, makeWrapper, shortenPerlShebang
|
||||
|
@ -359,6 +359,43 @@ latexindent = perlPackages.buildPerlPackage rec {
|
|||
};
|
||||
|
||||
|
||||
pygmentex = python2Packages.buildPythonApplication rec {
|
||||
pname = "pygmentex";
|
||||
inherit (src) version;
|
||||
|
||||
src = stdenv.lib.head (builtins.filter (p: p.tlType == "run") texlive.pygmentex.pkgs);
|
||||
|
||||
propagatedBuildInputs = with python2Packages; [ pygments chardet ];
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
doCheck = false;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -D ./scripts/pygmentex/pygmentex.py "$out"/bin/pygmentex
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://www.ctan.org/pkg/pygmentex;
|
||||
description = "Auxiliary tool for typesetting code listings in LaTeX documents using Pygments";
|
||||
longDescription = ''
|
||||
PygmenTeX is a Python-based LaTeX package that can be used for
|
||||
typesetting code listings in a LaTeX document using Pygments.
|
||||
|
||||
Pygments is a generic syntax highlighter for general use in all kinds of
|
||||
software such as forum systems, wikis or other applications that need to
|
||||
prettify source code.
|
||||
'';
|
||||
license = licenses.lppl13c;
|
||||
maintainers = with maintainers; [ romildo ];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
inherit biber;
|
||||
bibtexu = bibtex8;
|
||||
bibtex8 = stdenv.mkDerivation {
|
||||
|
|
|
@ -333,6 +333,7 @@ mapAliases ({
|
|||
ppl-address-book = throw "deprecated in 2019-05-02: abandoned by upstream.";
|
||||
processing3 = processing; # added 2019-08-16
|
||||
procps-ng = procps; # added 2018-06-08
|
||||
pygmentex = texlive.bin.pygmentex; # added 2019-12-15
|
||||
pyo3-pack = maturin;
|
||||
pmenu = throw "pmenu has been removed from nixpkgs, as its maintainer is no longer interested in the package."; # added 2019-12-10
|
||||
pulseaudioLight = pulseaudio; # added 2018-04-25
|
||||
|
|
|
@ -5850,8 +5850,6 @@ in
|
|||
|
||||
pydf = callPackage ../applications/misc/pydf { };
|
||||
|
||||
pygmentex = callPackage ../tools/typesetting/pygmentex { };
|
||||
|
||||
pympress = callPackage ../applications/office/pympress { };
|
||||
|
||||
pythonIRClib = pythonPackages.pythonIRClib;
|
||||
|
|
Loading…
Reference in a new issue