mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
Always merge functions "merge" and "check" if type defines them.
This commit is contained in:
parent
53994036d3
commit
acd4dcde63
1 changed files with 1 additions and 6 deletions
|
@ -55,12 +55,7 @@ rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
functionsFromType = opt:
|
functionsFromType = opt:
|
||||||
if decl ? type && decl.type ? merge then
|
opt // (builtins.intersectAttrs { merge = 1; check = 1; } (decl.type or {}));
|
||||||
opt
|
|
||||||
// optionalAttrs (decl.type ? merge) { inherit (decl.type) merge; }
|
|
||||||
// optionalAttrs (decl.type ? check) { inherit (decl.type) check; }
|
|
||||||
else
|
|
||||||
opt;
|
|
||||||
|
|
||||||
addDeclaration = opt: opt // decl;
|
addDeclaration = opt: opt // decl;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue