lib.makeScopeWithSplicing: provide default for keep,extra

These are often unneeded by the user.
This commit is contained in:
Artturin
2023-07-28 17:06:35 +03:00
parent cb13669b00
commit 3716ef19d8
11 changed files with 12 additions and 29 deletions

View File

@@ -39,15 +39,13 @@ let
selfHostHost = luaOnHostForHost.pkgs;
selfTargetTarget = luaOnTargetForTarget.pkgs or {};
};
keep = self: { };
extra = spliced0: {};
extensions = lib.composeManyExtensions [
generatedPackages
overriddenPackages
overrides
];
in makeScopeWithSplicing {
inherit otherSplices keep extra;
inherit otherSplices;
f = lib.extends extensions luaPackagesFun;
})
{

View File

@@ -34,10 +34,8 @@ let
selfHostHost = perlOnHostForHost.pkgs;
selfTargetTarget = perlOnTargetForTarget.pkgs or {};
};
keep = self: { };
extra = spliced0: {};
in makeScopeWithSplicing {
inherit otherSplices keep extra;
inherit otherSplices;
f = perlPackagesFun;
})
{

View File

@@ -48,7 +48,6 @@
};
hooks = import ./hooks/default.nix;
keep = lib.extends hooks pythonPackagesFun;
extra = _: {};
optionalExtensions = cond: as: lib.optionals cond as;
pythonExtension = import ../../../top-level/python-packages.nix;
python2Extension = import ../../../top-level/python2-packages.nix;
@@ -61,7 +60,7 @@
]);
aliases = self: super: lib.optionalAttrs config.allowAliases (import ../../../top-level/python-aliases.nix lib self super);
in makeScopeWithSplicing {
inherit otherSplices keep extra;
inherit otherSplices keep;
f = lib.extends (lib.composeExtensions aliases extensions) keep;
}) {
overrides = packageOverrides;