diff options
author | John Ericson <subscribe@JohnEricson.me> | 2018-09-24 18:04:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-24 18:04:18 -0400 |
commit | 22ce6141125760018ec525c7a6d8672604e0eddb (patch) | |
tree | e048fb6df861b6395e7e523d25715ac7c8b2ddaa /lib | |
parent | 39443c6bb7f9ea3df4488b9e01eddd48317d1137 (diff) | |
parent | b9dce11712d2bfc8cd367df5a7f737a5cec1e252 (diff) | |
download | nixlib-22ce6141125760018ec525c7a6d8672604e0eddb.tar nixlib-22ce6141125760018ec525c7a6d8672604e0eddb.tar.gz nixlib-22ce6141125760018ec525c7a6d8672604e0eddb.tar.bz2 nixlib-22ce6141125760018ec525c7a6d8672604e0eddb.tar.lz nixlib-22ce6141125760018ec525c7a6d8672604e0eddb.tar.xz nixlib-22ce6141125760018ec525c7a6d8672604e0eddb.tar.zst nixlib-22ce6141125760018ec525c7a6d8672604e0eddb.zip |
Merge pull request #47238 from obsidiansystems/overrideScope-order
lib: Deprecate `overrideScope` in lieu of `overrideScope'` taking arguments in the conventional order
Diffstat (limited to 'lib')
-rw-r--r-- | lib/customisation.nix | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/customisation.nix b/lib/customisation.nix index 0107ed33d9e4..df9d977e9ec7 100644 --- a/lib/customisation.nix +++ b/lib/customisation.nix @@ -185,7 +185,7 @@ rec { /* Make a set of packages with a common scope. All packages called with the provided `callPackage' will be evaluated with the same arguments. Any package in the set may depend on any other. The - `overrideScope' function allows subsequent modification of the package + `overrideScope'` function allows subsequent modification of the package set in a consistent way, i.e. all packages in the set will be called with the overridden packages. The package sets may be hierarchical: the packages in the set are called with the scope @@ -195,10 +195,10 @@ rec { let self = f self // { newScope = scope: newScope (self // scope); callPackage = self.newScope {}; - # TODO(@Ericson2314): Haromonize argument order of `g` with everything else - overrideScope = g: - makeScope newScope - (lib.fixedPoints.extends (lib.flip g) f); + overrideScope = g: lib.warn + "`overrideScope` (from `lib.makeScope`) is deprecated. Do `overrideScope' (self: self: { … })` 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); packages = f; }; in self; |