Skip to content

catdvi: init at 0.14#236518

Closed
ghost wants to merge 1 commit intomasterfrom
unknown repository
Closed

catdvi: init at 0.14#236518
ghost wants to merge 1 commit intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jun 7, 2023

Description of changes
Things done

@github-actions github-actions bot added the 6.topic: TeX Issues regarding texlive and TeX in general label Jun 7, 2023
@ghost ghost mentioned this pull request Jun 7, 2023
2 tasks
@ghost ghost added the 8.has: package (new) This PR adds a new package label Jun 7, 2023
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Jun 7, 2023
let
buildPlatformTools = [ "pse2unic" "adobe2h" ];
tex = texlive.combine {
inherit (texlive) collection-fontsrecommended;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Comment on lines +50 to +53
buildInputs = [
tex
];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

@ghost
Copy link
Copy Markdown
Author

ghost commented Oct 22, 2023

Unfortunately I am not likely to have time to finish this in the near future. :(

@ghost ghost closed this Oct 22, 2023
@ghost ghost deleted the pr/catdvi/init branch January 23, 2024 06:47
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: TeX Issues regarding texlive and TeX in general 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant