diff options
author | Marc Weber <marco-oweber@gmx.de> | 2013-08-22 10:32:13 +0300 |
---|---|---|
committer | Evgeny Egorochkin <phreedom@yandex.ru> | 2013-08-22 10:32:13 +0300 |
commit | acd4dcde6328dbacd8bff817d589dec132dae45e (patch) | |
tree | c4c63f34c570720809e3968f8d4ffd240724c645 /pkgs | |
parent | 53994036d35d2605ea79620b3cd9d37065f3a6be (diff) | |
download | nixlib-acd4dcde6328dbacd8bff817d589dec132dae45e.tar nixlib-acd4dcde6328dbacd8bff817d589dec132dae45e.tar.gz nixlib-acd4dcde6328dbacd8bff817d589dec132dae45e.tar.bz2 nixlib-acd4dcde6328dbacd8bff817d589dec132dae45e.tar.lz nixlib-acd4dcde6328dbacd8bff817d589dec132dae45e.tar.xz nixlib-acd4dcde6328dbacd8bff817d589dec132dae45e.tar.zst nixlib-acd4dcde6328dbacd8bff817d589dec132dae45e.zip |
Always merge functions "merge" and "check" if type defines them.
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/lib/options.nix | 7 |
1 files changed, 1 insertions, 6 deletions
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; |