mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-08 06:28:50 +03:00
Merge pull request #45394 from NixOS/makeScope-dry
lib: Use lib.fixed-points.extends to avoid repetition
This commit is contained in:
commit
f305b9b086
@ -195,9 +195,10 @@ 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 {};
|
||||||
|
# TODO(@Ericson2314): Haromonize argument order of `g` with everything else
|
||||||
overrideScope = g:
|
overrideScope = g:
|
||||||
makeScope newScope
|
makeScope newScope
|
||||||
(self_: let super = f self_; in super // g super self_);
|
(lib.fixedPoints.extends (lib.flip g) f);
|
||||||
packages = f;
|
packages = f;
|
||||||
};
|
};
|
||||||
in self;
|
in self;
|
||||||
|
Loading…
Reference in New Issue
Block a user