diff --git a/pkgs/tools/typesetting/tex/texlive/bin.nix b/pkgs/tools/typesetting/tex/texlive/bin.nix index c41fa32391ae..9ebe2d90d7d9 100644 --- a/pkgs/tools/typesetting/tex/texlive/bin.nix +++ b/pkgs/tools/typesetting/tex/texlive/bin.nix @@ -648,46 +648,6 @@ rec { enableParallelBuilding = true; }; - pygmentex = python3Packages.buildPythonApplication rec { - pname = "pygmentex"; - inherit (src) version; - pyproject = false; - - src = assertFixedHash pname texlive.pkgs.pygmentex.tex; - - propagatedBuildInputs = with python3Packages; [ - pygments - chardet - ]; - - dontBuild = true; - - doCheck = false; - - installPhase = '' - runHook preInstall - - install -D ./scripts/pygmentex/pygmentex.py "$out"/bin/pygmentex - - runHook postInstall - ''; - - meta = { - 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 = lib.licenses.lppl13c; - maintainers = with lib.maintainers; [ romildo ]; - }; - }; - asymptote = let version = "3.09"; diff --git a/pkgs/tools/typesetting/tex/texlive/default.nix b/pkgs/tools/typesetting/tex/texlive/default.nix index da8b6b547a68..ceba25edf09c 100644 --- a/pkgs/tools/typesetting/tex/texlive/default.nix +++ b/pkgs/tools/typesetting/tex/texlive/default.nix @@ -671,6 +671,7 @@ allPkgLists // { # for backward compatibility latexindent = texlive.pkgs.latexindent; + pygmentex = texlive.pkgs.pigmentex; }; combine = diff --git a/pkgs/tools/typesetting/tex/texlive/patch-scripts.sed b/pkgs/tools/typesetting/tex/texlive/patch-scripts.sed index c08d765ebd71..2587a1b1dd1d 100644 --- a/pkgs/tools/typesetting/tex/texlive/patch-scripts.sed +++ b/pkgs/tools/typesetting/tex/texlive/patch-scripts.sed @@ -3,7 +3,9 @@ N; # add script folder to path, unless we interfere with a docstring /\nr"""/b skip-python-path-patch - s!\n!\nimport sys; sys.path.insert(0,'@scriptsFolder@')\n! + # skip encoding declarations + /\n\s*#.*coding[=:]\s*[-a-zA-Z0-9_.]/N + s!\n\([^\n]*\)$!\nimport sys; sys.path.insert(0,'@scriptsFolder@')\n\1! :skip-python-path-patch } diff --git a/pkgs/tools/typesetting/tex/texlive/tlpdb-overrides.nix b/pkgs/tools/typesetting/tex/texlive/tlpdb-overrides.nix index 58131679d0a8..da4be6be6e2f 100644 --- a/pkgs/tools/typesetting/tex/texlive/tlpdb-overrides.nix +++ b/pkgs/tools/typesetting/tex/texlive/tlpdb-overrides.nix @@ -146,6 +146,14 @@ lib.recursiveUpdate orig rec { ulqda.extraBuildInputs = [ (perl.withPackages (ps: with ps; [ DigestSHA1 ])) ]; #### python packages + pygmentex.extraBuildInputs = [ + (python3.withPackages ( + ps: with ps; [ + pygments + chardet + ] + )) + ]; pythontex.extraBuildInputs = [ (python3.withPackages (ps: with ps; [ pygments ])) ]; #### other runtime PATH dependencies