texlive.withPackages: respect .outputSpecified even for old style packages (#265645)

This commit is contained in:
Vincenzo Mantova 2023-11-08 21:20:03 +00:00 committed by GitHub
parent 023b99e916
commit 04277cddb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,9 +40,10 @@ lib.fix (self: {
let
### texlive.combine backward compatibility
# if necessary, convert old style { pkgs = [ ... ]; } packages to attribute sets
ensurePkgSets = ps: if ! __fromCombineWrapper && builtins.any (p: p ? pkgs && builtins.all (p: p ? tlType) p.pkgs) ps
then let oldStyle = builtins.partition (p: p ? pkgs && builtins.all (p: p ? tlType) p.pkgs) ps;
in oldStyle.wrong ++ lib.concatMap toTLPkgSets oldStyle.right
isOldPkgList = p: ! p.outputSpecified or false && p ? pkgs && builtins.all (p: p ? tlType) p.pkgs;
ensurePkgSets = ps: if ! __fromCombineWrapper && builtins.any isOldPkgList ps
then let oldPkgLists = builtins.partition isOldPkgList ps;
in oldPkgLists.wrong ++ lib.concatMap toTLPkgSets oldPkgLists.right
else ps;
pkgList = rec {