lib.customisation: uncurry makeScopeWithSplicing

Deeply-curried functions are pretty error-prone in untyped languages
like Nix.  This is a particularly bad case because
`top-level/splice.nix` *also* declares a makeScopeWithSplicing, but
it takes *two fewer arguments*.

Let's switch to attrset-passing form, to provide some minimal level
of sanity-checking.
This commit is contained in:
Adam Joseph
2023-07-27 21:31:59 -07:00
parent 35abc09040
commit cb13669b00
12 changed files with 62 additions and 52 deletions
@@ -60,12 +60,10 @@
overrides
]);
aliases = self: super: lib.optionalAttrs config.allowAliases (import ../../../top-level/python-aliases.nix lib self super);
in makeScopeWithSplicing
otherSplices
keep
extra
(lib.extends (lib.composeExtensions aliases extensions) keep))
{
in makeScopeWithSplicing {
inherit otherSplices keep extra;
f = lib.extends (lib.composeExtensions aliases extensions) keep;
}) {
overrides = packageOverrides;
python = self;
});