python3: let lib.mkScopeWithSplicing do its job

Fixes #476822 and #480467 . By itself this change doesn't trigger many
rebuilds, but it is easier to justify it in conjunction with the
previous commit.

Co-Authored-By: Colin <colin@uninsane.org>
This commit is contained in:
Doron Behar
2026-01-23 02:00:19 +02:00
parent fbe7825430
commit 6421482683

View File

@@ -152,8 +152,6 @@ let
passthru =
let
# When we override the interpreter we also need to override the spliced versions of the interpreter
inputs' = lib.filterAttrs (n: v: n != "passthruFun" && !lib.isDerivation v) inputs;
# Memoization of the splices to avoid re-evaluating this function for all combinations of splices e.g.
# python3.pythonOnBuildForHost.pythonOnBuildForTarget == python3.pythonOnBuildForTarget by consuming
# __splices as an arg and using the cache if populated.
@@ -170,13 +168,9 @@ let
override =
attr:
let
python = attr.override (
inputs'
// {
self = python;
__splices = splices;
}
);
python = attr.override {
self = python;
};
in
python;
in