1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

* 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
pkgs = import nixpkgs {};
manualConfig =
{ environment.checkConfigurationOptions = false;
};
options = builtins.toFile "options.xml" (builtins.unsafeDiscardStringContext
(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" {} ''
${pkgs.libxslt}/bin/xsltproc -o $out ${./options-to-docbook.xsl} ${options}

View file

@ -40,7 +40,9 @@ let
};
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 = "
NixOS manual HTML file
";
@ -59,7 +61,10 @@ in let # !!! Bug in Nix 0.13pre14722, otherwise the following line is not aware
realManualFile =
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
manualFile;