Always merge functions "merge" and "check" if type defines them.

This commit is contained in:
Marc Weber 2013-08-22 10:32:13 +03:00 committed by Evgeny Egorochkin
parent 53994036d3
commit acd4dcde63

View file

@ -55,12 +55,7 @@ rec {
};
functionsFromType = opt:
if decl ? type && decl.type ? merge then
opt
// optionalAttrs (decl.type ? merge) { inherit (decl.type) merge; }
// optionalAttrs (decl.type ? check) { inherit (decl.type) check; }
else
opt;
opt // (builtins.intersectAttrs { merge = 1; check = 1; } (decl.type or {}));
addDeclaration = opt: opt // decl;