* Fix building the manual.

svn path=/nixos/branches/modular-nixos/; revision=15877
This commit is contained in:
Eelco Dolstra 2009-06-05 15:04:58 +00:00
parent d69710cdf4
commit f4b5a21d59
2 changed files with 12 additions and 5 deletions

View File

@ -1,12 +1,14 @@
{nixpkgs ? ../../../nixpkgs}: {pkgs}:
let let
pkgs = import nixpkgs {}; manualConfig =
{ environment.checkConfigurationOptions = false;
};
options = builtins.toFile "options.xml" (builtins.unsafeDiscardStringContext options = builtins.toFile "options.xml" (builtins.unsafeDiscardStringContext
(builtins.toXML (pkgs.lib.optionAttrSetToDocList "" (builtins.toXML (pkgs.lib.optionAttrSetToDocList ""
(import ../../system/system.nix {inherit nixpkgs; configuration = {};}).optionDeclarations))); (import ../../lib/eval-config.nix {inherit pkgs; configuration = manualConfig;}).optionDeclarations)));
optionsDocBook = pkgs.runCommand "options-db.xml" {} '' optionsDocBook = pkgs.runCommand "options-db.xml" {} ''
${pkgs.libxslt}/bin/xsltproc -o $out ${./options-to-docbook.xsl} ${options} ${pkgs.libxslt}/bin/xsltproc -o $out ${./options-to-docbook.xsl} ${options}

View File

@ -40,7 +40,9 @@ let
}; };
manualFile = mkOption { manualFile = mkOption {
default = null; # Note: we can't use a default here (see below), since it
# causes an infinite recursion building the manual.
default = null;
description = " description = "
NixOS manual HTML file NixOS manual HTML file
"; ";
@ -59,7 +61,10 @@ in let # !!! Bug in Nix 0.13pre14722, otherwise the following line is not aware
realManualFile = realManualFile =
if manualFile == null then if manualFile == null then
(import ../doc/manual {nixpkgs = pkgs;})+"/manual.html" # We could speed up the evaluation of the manual expression by
# providing it the optionDeclarations of the current
# configuration.
"${import ../../../doc/manual {inherit pkgs;}}/manual.html"
else else
manualFile; manualFile;