mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 13:10:33 +00:00
svn path=/nixpkgs/trunk/; revision=9617
This commit is contained in:
parent
b5f893d92a
commit
9d1fc7c5ba
|
@ -208,7 +208,7 @@ rec {
|
|||
|
||||
typeOf = x: if x ? _type then x._type else "";
|
||||
|
||||
fillOptionsDefaults = defs: opts: opts //
|
||||
addDefaultOptionValues = defs: opts: opts //
|
||||
builtins.listToAttrs (map (defName:
|
||||
{ name = defName;
|
||||
value =
|
||||
|
@ -226,8 +226,8 @@ rec {
|
|||
# `defValue' is an attribute set containing options.
|
||||
# So recurse.
|
||||
if builtins.hasAttr defName opts && builtins.isAttrs optValue
|
||||
then fillOptionsDefaults defValue optValue
|
||||
else fillOptionsDefaults defValue {};
|
||||
then addDefaultOptionValues defValue optValue
|
||||
else addDefaultOptionValues defValue {};
|
||||
}
|
||||
) (builtins.attrNames defs));
|
||||
|
||||
|
|
Loading…
Reference in a new issue