-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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.withPackages: relax dependency resolution #321750
texlive.withPackages: relax dependency resolution #321750
Conversation
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/new-tex-live-withpackages-function/34902/22 |
The change allow swapping one package with a different one by simply passing the new package to `.withPackages`.
7e0f164
to
7f1a82f
Compare
Result of 29 packages marked as broken and skipped:
15 packages failed to build:
233 packages built:
|
nixpkgs-review seems good... @veprbl before merging, let's wait for confirmation that |
Oh, this is very easy to test: nix-repl> (texliveInfraOnly.withPackages (_: [ { pname = "scheme-infraonly"; } ])).requiredTeXPackages
[ ] Passing |
Description of changes
Solves the problem of replacing one package with a different version (see https://discourse.nixos.org/t/new-tex-live-withpackages-function/34902/19?u=xworld21 and preceding discussion).
This is done with two changes: first,
.withPackages
process its argument before the packages already included in the scheme; second, theversion
attribute is dropped from the dependency resolution. Thus, replacing e.g.minted
with a new version should be as easy asas long as
newminted.pname == texlive.pkgs.minted.pname
.It is not a solid way to replace a package with another one, because it does not compose well and it is very sensitive to the order of the arguments, so I will not reference it in the documentation.
overrideScope
will be the supported way to do that kind of change, when ready.Note: this requires a
nixpkgs-review
to ensure I did not break packages relying on.withPackages
.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.