diff --git a/pkgs/lib/options.nix b/pkgs/lib/options.nix index 5c896d5714c9..5f04f1ca8fb4 100644 --- a/pkgs/lib/options.nix +++ b/pkgs/lib/options.nix @@ -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;