mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
lib.customisation.makeScope: Make overrideScope
consistent with makeScopeWithSplicing
Right now converting `makeScope` to `makeScopeWithSplicing` is not
transparent to users and requires adding a warning for `overrideScope'`
in the set itself.
Warning and `overrideScope'` were added in 2018 b9dce11712
and there should be no users left after 5 years.
This commit is contained in:
parent
af9458db2d
commit
3c1f82f99e
1 changed files with 5 additions and 4 deletions
|
@ -269,10 +269,11 @@ rec {
|
||||||
let self = f self // {
|
let self = f self // {
|
||||||
newScope = scope: newScope (self // scope);
|
newScope = scope: newScope (self // scope);
|
||||||
callPackage = self.newScope {};
|
callPackage = self.newScope {};
|
||||||
overrideScope = g: lib.warn
|
overrideScope = g: makeScope newScope (lib.fixedPoints.extends g f);
|
||||||
"`overrideScope` (from `lib.makeScope`) is deprecated. Do `overrideScope' (self: super: { … })` instead of `overrideScope (super: self: { … })`. All other overrides have the parameters in that order, including other definitions of `overrideScope`. This was the only definition violating the pattern."
|
# Remove after 24.11 is released.
|
||||||
(makeScope newScope (lib.fixedPoints.extends (lib.flip g) f));
|
overrideScope' = g: lib.warnIf (lib.isInOldestRelease 2311)
|
||||||
overrideScope' = g: makeScope newScope (lib.fixedPoints.extends g f);
|
"`overrideScope'` (from `lib.makeScope`) has been renamed to `overrideScope`."
|
||||||
|
(makeScope newScope (lib.fixedPoints.extends g f));
|
||||||
packages = f;
|
packages = f;
|
||||||
};
|
};
|
||||||
in self;
|
in self;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue