nixos docs: Add a makefile for hacking on the nixos docs

wip/yesman
Graham Christensen 6 years ago
parent 59f8b1e844
commit 0ff0d138e4
No known key found for this signature in database
GPG Key ID: ACA1C1D120C83D5C
  1. 8
      nixos/doc/manual/Makefile
  2. 1
      nixos/doc/manual/default.nix
  3. 3
      nixos/doc/manual/manual.xml
  4. 8
      nixos/doc/manual/options-to-docbook.xsl
  5. 2
      nixos/release.nix

@ -0,0 +1,8 @@
debug:
nix-shell --packages xmloscopy \
--run 'xmloscopy --docbook5 ./manual.xml ./manual-combined.xml'
generated: ./options-to-docbook.xsl
nix-build ../../release.nix \
--attr manualGeneratedSources.x86_64-linux \
--out-link ./generated

@ -229,6 +229,7 @@ let
'';
in rec {
inherit generatedSources;
# The NixOS options in JSON format.
optionsJSON = runCommand "options-json"

@ -39,7 +39,8 @@
<appendix xml:id="ch-options">
<title>Configuration Options</title>
<xi:include href="./generated/options-db.xml" />
<xi:include href="./generated/options-db.xml"
xpointer="configuration-variable-list" />
</appendix>
<xi:include href="release-notes/release-notes.xml" />

@ -15,9 +15,9 @@
<xsl:template match="/expr/list">
<variablelist>
<appendix>
<title>Configuration Options</title>
<variablelist xml:id="configuration-variable-list">
<xsl:for-each select="attrs">
<xsl:variable name="id" select="concat('opt-', str:replace(str:replace(str:replace(str:replace(attr[@name = 'name']/string/@value, '*', '_'), '&lt;', '_'), '>', '_'), '?', '_'))" />
<varlistentry>
@ -100,7 +100,7 @@
</xsl:for-each>
</variablelist>
</appendix>
</xsl:template>

@ -124,7 +124,6 @@ let
preferLocalBuild = true;
};
in rec {
channel = import lib/make-channel.nix { inherit pkgs nixpkgs version versionSuffix; };
@ -132,6 +131,7 @@ in rec {
manual = buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.manual);
manualEpub = (buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.manualEpub));
manpages = buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.manpages);
manualGeneratedSources = buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.generatedSources);
options = (buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.optionsJSON)).x86_64-linux;

Loading…
Cancel
Save