* For the generation of manual / manpages, don't evaluate the option

declarations again (because we already have them).  This cuts
  evaluation time from 7.2s to 4.9s.

svn path=/nixos/trunk/; revision=16798
This commit is contained in:
Eelco Dolstra
2009-08-21 09:08:55 +00:00
parent b48a1c394b
commit f1035de47c
3 changed files with 11 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
{pkgs}:
{ pkgs, optionDeclarations }:
let
@@ -7,9 +7,14 @@ let
services.nixosManual.enable = false;
};
# To prevent infinite recursion, remove system.path from the
# options. Not sure why this happens.
optionDeclarations_ =
optionDeclarations //
{ system = removeAttrs optionDeclarations.system ["path"]; };
options = builtins.toFile "options.xml" (builtins.unsafeDiscardStringContext
(builtins.toXML (pkgs.lib.optionAttrSetToDocList ""
(import ../../lib/eval-config.nix {inherit pkgs; configuration = manualConfig;}).optionDeclarations)));
(builtins.toXML (pkgs.lib.optionAttrSetToDocList "" optionDeclarations_)));
optionsDocBook = pkgs.runCommand "options-db.xml" {} ''
${pkgs.libxslt}/bin/xsltproc -o $out ${./options-to-docbook.xsl} ${options}