texlive.withPackages: do not override output attributes (#296751)

The output attributes should never be modified to avoid interfering with
standard interfaces such as overrideAttrs.
This commit is contained in:
Vincenzo Mantova 2024-03-21 01:36:59 +00:00 committed by GitHub
parent 527e02169a
commit b2f2956473
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -172,7 +172,6 @@ let
# emulate split output derivation # emulate split output derivation
splitOutputs = { splitOutputs = {
out = out // { outputSpecified = true; };
texmfdist = texmfdist // { outputSpecified = true; }; texmfdist = texmfdist // { outputSpecified = true; };
texmfroot = texmfroot // { outputSpecified = true; }; texmfroot = texmfroot // { outputSpecified = true; };
} // (lib.genAttrs pkgList.nonEnvOutputs (outName: (buildEnv { } // (lib.genAttrs pkgList.nonEnvOutputs (outName: (buildEnv {
@ -186,9 +185,9 @@ let
inherit meta passthru; inherit meta passthru;
}).overrideAttrs { outputs = [ outName ]; } // { outputSpecified = true; })); }).overrideAttrs { outputs = [ outName ]; } // { outputSpecified = true; }));
passthru = lib.optionalAttrs (! __combine) (splitOutputs // { passthru = {
all = builtins.attrValues splitOutputs; # these are not part of pkgList.nonEnvOutputs and must be exported in passthru
}) // { inherit (splitOutputs) texmfdist texmfroot;
# This is set primarily to help find-tarballs.nix to do its job # This is set primarily to help find-tarballs.nix to do its job
requiredTeXPackages = builtins.filter lib.isDerivation (pkgList.bin ++ pkgList.nonbin requiredTeXPackages = builtins.filter lib.isDerivation (pkgList.bin ++ pkgList.nonbin
++ lib.optionals (! __fromCombineWrapper) ++ lib.optionals (! __fromCombineWrapper)