-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
texlive: how to get texdoc to work? #118757
Comments
The following seems to work around the let tl = pkgs.texlive; in (tl.combine ({
pkgFilter = p: p.tlType == "run" || p.tlType == "bin" || p.tlType == "doc" || p.pname == "core";
} // { inherit (tl)
scheme-medium
; })).override (super: {
paths = let
pathsSuper = super.paths or [ ];
inherit (builtins) match storeDir;
inherit (lib) isStorePath partition removePrefix substring;
removeStoreAndHashPrefix = p: substring 34 (-1) (removePrefix storeDir p);
isTlBinDoc = p: isStorePath p && match "texlive-bin-[0-9]{4}-doc(/.*)?" (removeStoreAndHashPrefix p) != null;
rightThenWrong = { right, wrong, ... }: right ++ wrong;
in rightThenWrong (partition isTlBinDoc pathsSuper);
ignoreCollisions = true;
}) (Documentation for binaries may conflict with preferred documentation from Nixpkgs's TeX Live However, even with that
Texdoc stopped shipping its own fallback TLPDB information with v3.0: TeX-Live/texdoc#20 . Gentoo has a related bug ( https://bugs.gentoo.org/687592 ) and patch ( https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c1eca3b76170d18bb229dd35ec34c256b3faa51 ) where it began packaging its own We could replicate that approach, as that file is used to generate nixpkgs/pkgs/tools/typesetting/tex/texlive/UPGRADING.md Lines 34 to 44 in e019872
Alternatively, Nixpkgs should be able to provide an appropriate TLPDB file when combining. |
A proper solution for collisions is to make sure that there isn't a duplicate man page in texlive.bin.core{,-big}. Shipping tlpdb should not be a problem, the question is how to make it so that texdoc finds it. |
I think the simplest approach would be to put it in the correct place, see https://github.com/TeX-Live/texdoc/wiki/Packaging-Texdoc I hope this helps! |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/texdoc-cannot-find-texlive-tlpdb/9303/2 |
I have a branch where the The only problem is that I haven't done anything about the man pages, so you still need to use Edit: the texdoc maintainers were incredibly quick and added the patch upstream, so I have made a PR now. |
I marked this as stale due to inactivity. → More info |
For me, using this: tl = pkgs.texlive.combine {
inherit (pkgs.texlive) scheme-full;
# see nixpkgs/pkgs/tools/typesetting/tex/texlive/combine.nix
pkgFilter = (pkg:
pkg.tlType == "run" || pkg.tlType == "bin" || pkg.pname == "core"
|| pkg.tlType == "doc" );
}; It now get's one step further (on nixos-unstable), i.e. no error, but it does not find any documentation. |
In my case, texdoc works without much troubles (NixOs unstable 1ffba9f), including when I install the documentation for all packages (by default, it just comes with 30 docs, when I install the documentation for all packages I have 9393 docs):
Demo:
However, I hit two compilation errors that I needed to solve to make this work:
To avoid these issues, I actually need to add to my configuration:
then switch to make sure this will be applied on the next compilation, then I add texlive allowing collisions :
|
Ah indeed, I think I was still in an old shell session while trying it out. pam.loginLimits = [{
domain = "*";
type = "soft";
item = "nofile";
value = "4096"; # four times the default; hopefully sufficient
}]; which is sufficient for me. |
Closing as the main issue is solved, and the remaining problems seem to have separate issues open |
Describe the bug
I would like to use texdoc but it does not work.
Things I tried: using texlive.combined.scheme-full as well as scheme-medium with
results in
Trying
does not work at all due to a collision
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Open the pdf with the documentation of the package
Additional context
Add any other context about the problem here.
Notify maintainers
@veprbl
Metadata
"x86_64-linux"
Linux 5.11.11, NixOS, 21.05.20210405.3d1a771 (Okapi)
yes
yes
nix-env (Nix) 2.4pre20210326_dd77f71
/nix/store/sz015sc0y6adpacafc4zs35wf8364c6a-source
Maintainer information:
The text was updated successfully, but these errors were encountered: