Conversation
| let | ||
| buildPlatformTools = [ "pse2unic" "adobe2h" ]; | ||
| tex = texlive.combine { | ||
| inherit (texlive) collection-fontsrecommended; |
There was a problem hiding this comment.
This is not documented (yet?), but we should discourage using texlive as a build input (i.e. runtime/host dependency) unless there is a very good reason.
In this case, collection-fontsrecommended is a big dependency – a user may only need fewer fonts – but it is also not comprehensive, as DVIs may refer to other fonts. As a general rule, TeX Live should rather be provided by the user at runtime.
If catdvi uses kpsewhich, then you can simply remove tex, and it will work. If it uses kpathsea the C library, uhm, then maybe this should have tlType = "bin" and be passed to texlive.combine so that it gets wrapped with the desired TEXMFCNF – I don't believe there is another good solution. See the package mftrace.
| '') buildPlatformTools} | ||
| '' + '' | ||
| mkdir -p $out/share | ||
| ln -s ${tex}/share/texmf-var $out/share/texmf |
There was a problem hiding this comment.
Assuming that hardcoding the dependency on a particular texlive combination is fine, you should not hardcode the texmf-var folder, rather use kpsewhich to find where it is. Why should it be linked to $out/share/texmf? Because of texmf.cnf? If so, you should wrap the binaries with the correct TEXMFCNF value, or link the texmf.cnf file only – whichever is more appropriate for this case.
There was a problem hiding this comment.
| ln -s ${tex}/share/texmf-var $out/share/texmf |
This should become irrelevant when catdvi is used in texlive.combine, as it will know the true value of $TEXMFSYSVAR.
| buildInputs = [ | ||
| tex | ||
| ]; | ||
|
|
There was a problem hiding this comment.
| buildInputs = [ | |
| tex | |
| ]; | |
| passthru.tlDeps = with texlive; [ kpathsea ]; | |
| passthru.tlType = "bin"; |
Then one must run texlive.combine { inherit (texlive) scheme-small; inherit catdvi; } to get a working catdvi. This is probably the only workable way of running programs compiled against kpathsea.
| '') buildPlatformTools} | ||
| '' + '' | ||
| mkdir -p $out/share | ||
| ln -s ${tex}/share/texmf-var $out/share/texmf |
There was a problem hiding this comment.
| ln -s ${tex}/share/texmf-var $out/share/texmf |
This should become irrelevant when catdvi is used in texlive.combine, as it will know the true value of $TEXMFSYSVAR.
|
Unfortunately I am not likely to have time to finish this in the near future. :( |
Description of changes
Things done