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/lib/options.nix | |
parent | 53994036d35d2605ea79620b3cd9d37065f3a6be (diff) | |
download | nixpkgs-acd4dcde6328dbacd8bff817d589dec132dae45e.tar nixpkgs-acd4dcde6328dbacd8bff817d589dec132dae45e.tar.gz nixpkgs-acd4dcde6328dbacd8bff817d589dec132dae45e.tar.bz2 nixpkgs-acd4dcde6328dbacd8bff817d589dec132dae45e.tar.lz nixpkgs-acd4dcde6328dbacd8bff817d589dec132dae45e.tar.xz nixpkgs-acd4dcde6328dbacd8bff817d589dec132dae45e.tar.zst nixpkgs-acd4dcde6328dbacd8bff817d589dec132dae45e.zip |
Always merge functions "merge" and "check" if type defines them.
Diffstat (limited to 'pkgs/lib/options.nix')
-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 5c896d5714c..5f04f1ca8fb 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; |