summary refs log tree commit diff
path: root/pkgs/lib/options.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2010-05-28 11:20:45 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2010-05-28 11:20:45 +0000
commit1ba3165b4e95fccbb9d46429b5557966a05c3420 (patch)
tree675ce22817ebf542054ea03537928ca5b1d4ae87 /pkgs/lib/options.nix
parent932899f3daf78bcb8fd2f56ef17732ddde0d1b0d (diff)
downloadnixpkgs-1ba3165b4e95fccbb9d46429b5557966a05c3420.tar
nixpkgs-1ba3165b4e95fccbb9d46429b5557966a05c3420.tar.gz
nixpkgs-1ba3165b4e95fccbb9d46429b5557966a05c3420.tar.bz2
nixpkgs-1ba3165b4e95fccbb9d46429b5557966a05c3420.tar.lz
nixpkgs-1ba3165b4e95fccbb9d46429b5557966a05c3420.tar.xz
nixpkgs-1ba3165b4e95fccbb9d46429b5557966a05c3420.tar.zst
nixpkgs-1ba3165b4e95fccbb9d46429b5557966a05c3420.zip
* 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
Diffstat (limited to 'pkgs/lib/options.nix')
-rw-r--r--pkgs/lib/options.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/lib/options.nix b/pkgs/lib/options.nix
index 3db9b671fe3..570be886552 100644
--- a/pkgs/lib/options.nix
+++ b/pkgs/lib/options.nix
@@ -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