From ee58ad7b4cc50e5bee73c9ee58148abb8bb2698f Mon Sep 17 00:00:00 2001 From: aszlig Date: Tue, 21 Oct 2014 21:59:25 +0200 Subject: release: Add manual for Vuizvui-specific options. Signed-off-by: aszlig --- release.nix | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 59 insertions(+), 3 deletions(-) (limited to 'release.nix') diff --git a/release.nix b/release.nix index 52126c8c..df248706 100644 --- a/release.nix +++ b/release.nix @@ -1,11 +1,67 @@ -with import ; +let + system = "x86_64-linux"; + pkgs = import { inherit system; }; + +in with pkgs.lib; with builtins; { -{ machines = mapAttrs (name: configuration: (import { inherit configuration; }).system) (import ./network.nix); tests = { - i3 = import ./tests/i3.nix { system = "x86_64-linux"; }; + i3 = import ./tests/i3.nix { inherit system; }; + }; + + manual = let + modules = import { + modules = import ./modules/module-list.nix; + check = false; + inherit system; + }; + + isVuizvui = opt: head (splitString "." opt.name) == "vuizvui"; + filterDoc = filter (opt: isVuizvui opt && opt.visible && !opt.internal); + optionsXML = toXML (filterDoc (optionAttrSetToDocList modules.options)); + optionsFile = toFile "options.xml" (unsafeDiscardStringContext optionsXML); + in pkgs.stdenv.mkDerivation { + name = "vuizvui-options"; + + buildInputs = singleton pkgs.libxslt; + + xsltFlags = '' + --param section.autolabel 1 + --param section.label.includes.component.label 1 + --param html.stylesheet 'style.css' + --param xref.with.number.and.title 1 + --param admon.style ''' + ''; + + buildCommand = '' + xsltproc -o options-db.xml \ + ${} \ + ${optionsFile} + + cat > manual.xml < + Vuizvui-specific NixOS options + + The following NixOS options are specific to Vuizvui: + + + + XML + + xsltproc -o "$out/manual.html" $xsltFlags -nonet -xinclude \ + ${pkgs.docbook5_xsl}/xml/xsl/docbook/xhtml/docbook.xsl \ + manual.xml + + cp "${}" "$out/style.css" + + mkdir -p "$out/nix-support" + echo "doc manual $out manual.html" \ + > "$out/nix-support/hydra-build-products" + ''; }; } -- cgit 1.4.1