1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

texlive.withPackages: resolve dependencies by pname only

The change allow swapping one package with a different one by simply
passing the new package to `.withPackages`.
This commit is contained in:
Vincenzo Mantova 2024-06-23 10:48:18 +01:00
parent 82aa005d8e
commit 7f1a82fdee

View file

@ -63,7 +63,7 @@ let
(p: p.outputSpecified or false -> builtins.elem (p.tlOutputName or p.outputName) [ "out" "tex" "tlpkg" ])
packages;
keySet = p: {
key = ((p.name or "${p.pname}-${p.version}") + "-" + p.tlOutputName or p.outputName or "");
key = p.pname or p.name + lib.optionalString (p.outputSpecified or false) ("-" + p.tlOutputName or p.outputName or "");
inherit p;
tlDeps = if p ? tlDeps then ensurePkgSets p.tlDeps else (p.requiredTeXPackages or (_: [ ]) tl);
};