diff options
author | Artturin <Artturin@artturin.com> | 2023-08-14 01:42:25 +0300 |
---|---|---|
committer | Artturin <Artturin@artturin.com> | 2023-08-14 18:46:47 +0300 |
commit | 3c1f82f99ee02dad4eb480f6216ae2ece445d11d (patch) | |
tree | c201ac1b9d3d60c9f46fd64cae49af60f471e250 | |
parent | af9458db2deab7e80cff3f87b8ca68f22ec8c446 (diff) | |
download | nixpkgs-3c1f82f99ee02dad4eb480f6216ae2ece445d11d.tar nixpkgs-3c1f82f99ee02dad4eb480f6216ae2ece445d11d.tar.gz nixpkgs-3c1f82f99ee02dad4eb480f6216ae2ece445d11d.tar.bz2 nixpkgs-3c1f82f99ee02dad4eb480f6216ae2ece445d11d.tar.lz nixpkgs-3c1f82f99ee02dad4eb480f6216ae2ece445d11d.tar.xz nixpkgs-3c1f82f99ee02dad4eb480f6216ae2ece445d11d.tar.zst nixpkgs-3c1f82f99ee02dad4eb480f6216ae2ece445d11d.zip |
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 b9dce11712d2bfc8cd367df5a7f737a5cec1e252 and there should be no users left after 5 years.
-rw-r--r-- | lib/customisation.nix | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/customisation.nix b/lib/customisation.nix index a9281b1ab69..e1332007602 100644 --- a/lib/customisation.nix +++ b/lib/customisation.nix @@ -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; |