* Allow the default for option values displayed in the manual to be
overriden. Some defaults should not be evaluated because they cause unnecessary evaluation or might cause evaluation errors (e.g. assertions). For instance, the value of the `boot.kernelPackages' option is an attribute set. Some packages in that set might not evaluate (e.g. AUFS2 on kernels that don't have the AUFS2 patch), and in any case it slows down nixos-rebuild to evaluate lots of packages that are not actually used in the configuration. svn path=/nixpkgs/trunk/; revision=22043
This commit is contained in:
parent
932899f3da
commit
1ba3165b4e
|
@ -263,7 +263,8 @@ rec {
|
|||
definitions = map (x: toString x.source) opt.definitions;
|
||||
}
|
||||
// optionalAttrs (opt ? example) { example = scrubOptionValue opt.example; }
|
||||
// optionalAttrs (opt ? default) { default = scrubOptionValue opt.default; };
|
||||
// optionalAttrs (opt ? default) { default = scrubOptionValue opt.default; }
|
||||
// optionalAttrs (opt ? defaultText) { default = opt.defaultText; };
|
||||
|
||||
subOptions =
|
||||
if opt ? options then
|
||||
|
|
Loading…
Reference in a new issue