diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2010-05-12 09:31:46 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2010-05-12 09:31:46 +0000 |
commit | da7e1fbea30140a517fe822814ba2e39b07b5cd4 (patch) | |
tree | b301dbcaa4bc56826bdbb15e46559357e8b324f2 | |
parent | 55a322022ce5d322eb41ab3d2f0be9a82c0bbaf4 (diff) | |
download | nixlib-da7e1fbea30140a517fe822814ba2e39b07b5cd4.tar nixlib-da7e1fbea30140a517fe822814ba2e39b07b5cd4.tar.gz nixlib-da7e1fbea30140a517fe822814ba2e39b07b5cd4.tar.bz2 nixlib-da7e1fbea30140a517fe822814ba2e39b07b5cd4.tar.lz nixlib-da7e1fbea30140a517fe822814ba2e39b07b5cd4.tar.xz nixlib-da7e1fbea30140a517fe822814ba2e39b07b5cd4.tar.zst nixlib-da7e1fbea30140a517fe822814ba2e39b07b5cd4.zip |
* Do not silently ignore broken "example" and "default" attributes
when generating the documentation. If they're broken, they should be fixed. svn path=/nixpkgs/trunk/; revision=21738
-rw-r--r-- | pkgs/lib/options.nix | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/pkgs/lib/options.nix b/pkgs/lib/options.nix index edcbfaa48305..d975f904085f 100644 --- a/pkgs/lib/options.nix +++ b/pkgs/lib/options.nix @@ -251,12 +251,6 @@ rec { # the set generated with filterOptionSets. optionAttrSetToDocList = ignore: newOptionAttrSetToDocList; newOptionAttrSetToDocList = attrs: - let tryEval = v: - let res = builtins.tryEval v; in - if builtins ? tryEval then - if res.success then res.value else "<error>" - else v; - in let options = collect isOption attrs; in fold (opt: rest: let @@ -268,8 +262,8 @@ rec { declarations = map (x: toString x.source) opt.declarations; definitions = map (x: toString x.source) opt.definitions; } - // optionalAttrs (opt ? example) { example = tryEval opt.example; } - // optionalAttrs (opt ? default) { default = tryEval opt.default; }; + // optionalAttrs (opt ? example) { example = opt.example; } + // optionalAttrs (opt ? default) { default = opt.default; }; subOptions = if opt ? options then |