mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 04:19:00 +02: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
|
@ -269,10 +269,11 @@ rec {
|
|||
let self = f self // {
|
||||
newScope = scope: newScope (self // scope);
|
||||
callPackage = self.newScope {};
|
||||
overrideScope = g: lib.warn
|
||||
"`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."
|
||||
(makeScope newScope (lib.fixedPoints.extends (lib.flip g) f));
|
||||
overrideScope' = g: makeScope newScope (lib.fixedPoints.extends g f);
|
||||
overrideScope = g: makeScope newScope (lib.fixedPoints.extends g f);
|
||||
# Remove after 24.11 is released.
|
||||
overrideScope' = g: lib.warnIf (lib.isInOldestRelease 2311)
|
||||
"`overrideScope'` (from `lib.makeScope`) has been renamed to `overrideScope`."
|
||||
(makeScope newScope (lib.fixedPoints.extends g f));
|
||||
packages = f;
|
||||
};
|
||||
in self;
|
||||
|
|
Loading…
Reference in a new issue