Code change:
}; <ins> 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 ]; }; }; </ins> inherit biber; bibtexu = bibtex8; bibtex8 = stdenv.mkDerivation {

Related discussion:
text: I have installed the TeXLive package on my system, but its binary script fails to run because: its directory is not found in it does not have an explicitly dependency on it does not have an explicitly dependency on the module for Python 2 cannot be found. Please fix this issues so that the script can be run. (Maybe can take a look at this.)
cc
Well, the first two bullets would be fixed very simply by but I don't yet have framework to add external python dependencies to the scripts.
Nothing new here? A similar problem happens with :
cc Maybe while a good solution is not engineered, a package for without the TeX stuff can be to . It would contain the binary with support for the needed Python dependencies. What do you think?
There aren't any true binaries, are there? It's just python scripts IIRC. But still, what you propose is probably the easiest way to resolve this somehow.
It is just a Python script that depends on the module.
My attempt at it:
So pygmentex works as expected now?
It works! It can be tested by downloading the example document from the distribution on , unzipping the downloaded files, removing the Python script and the LaTeX style class, and than compiling : The result is , with many examples of code listings typeset by Pygments.
OK, then I think we can close this.
Sorry for necromancing this (should I have opened a new issue instead?), but it doesn't "just work" – or needs further documentation on how to use it: The created by building the pygmentex texlive package can not find the module. gives us such an environment, just try running the command from there -The package though provides a executable which works just fine and finds the needed pygments python module. So how to combine these both packages? In particular I ran into this when trying to use the texlive package, as that seems to directly invoke the executable during build. Issue appears on release-18.09
I encountered the same issue, the latex package seems to be working fine tough (and can be used as a replacement)
I have in both with (which provides the style file and a non-functional Python script, because of missing Python dependencies) and (which provides the script). This setup works for me.
I still do not know a way of allowing Python module dependencies for Python scripts installed through .
This is to be fixed in