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

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;