Skip to content

texlive.withPackages: add withDocs, withSources and expose texliveFullWithDocs at top level#497867

Open
xworld21 wants to merge 2 commits intoNixOS:masterfrom
xworld21:texlive-with-docs
Open

texlive.withPackages: add withDocs, withSources and expose texliveFullWithDocs at top level#497867
xworld21 wants to merge 2 commits intoNixOS:masterfrom
xworld21:texlive-with-docs

Conversation

@xworld21
Copy link
Contributor

@xworld21 xworld21 commented Mar 8, 2026

Expose new attributes withDocs, withSources that evaluate to the same texlive.withPackages derivation, but with withDocs = true. I have added texliveFullWithDocs at the top level to have Hydra add all texdoc containers to the binary cache.

If this gets merged, I think we can finally deprecate texlive.combine for good, and start updating the documentation.

There's a bit of history around these changes.

I tried to implement .overrideAttrs { withDocs = true; } quite some time ago (#312945), but it died out, it's just too cumbersome to implement (see also #432957) and it doesn't look like people were clamoring for it. .overrideAttrs is also tricky to get right, because some overrides require rebuilding the formats, some don't. It's hard to come up with an overriding mechanism that captures this nicely. Instead, .withDocs is embarrassingly simple to add (and suggests adding .withPaper for switching defaults between A4 and letter). At any rate, if we manage to implement a version .overrideAttrs { withDocs = true; }, leaving the .withDocs alias is very cheap.

The top level texliveFullWithDocs is odd, but when I tried to have Hydra build all texdoc containers via texlivePackages, I was told that in fact building each TeX Live package separately causes scheduling issues. I forgot where that conversation was!

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

@xworld21 xworld21 requested review from chrjabs and veprbl March 8, 2026 10:51
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 6.topic: TeX Issues regarding texlive and TeX in general labels Mar 8, 2026
@xworld21 xworld21 force-pushed the texlive-with-docs branch from a226a59 to 44c09bd Compare March 8, 2026 12:03
@chrjabs
Copy link
Contributor

chrjabs commented Mar 10, 2026

Even though I've done the last couple of texlive version updates, I'm not actually too familiar with the internals of how the packaging works. Is there some discussion somewhere on deprecating texlive.combine?

Copy link
Contributor

@chrjabs chrjabs left a comment

Choose a reason for hiding this comment

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

Tests (nix-build ../../../../.. -A tests.texlive --no-out-link) and build of texliveFullWithDocs (nix build .#texliveFullWithDocs) pass (on x86_64-linux), so looks good to me.

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Mar 10, 2026
@xworld21
Copy link
Contributor Author

Is there some discussion somewhere on deprecating texlive.combine?

I have mentioned it a few times since introducing texlive.withPackages, because there's a lot of extra code to maintain compatibility with texlive.combine and it's all very ugly. I'll open a discussion, though. I am not sure myself how to deprecate it properly (starting with 26.05 or right after 26.05? etc etc).

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 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package 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. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants