Merge pull request #45394 from NixOS/makeScope-dry

lib: Use lib.fixed-points.extends to avoid repetition
This commit is contained in:
John Ericson 2018-08-20 13:41:10 -04:00 committed by GitHub
commit f305b9b086
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -195,9 +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
(self_: let super = f self_; in super // g super self_);
(lib.fixedPoints.extends (lib.flip g) f);
packages = f;
};
in self;