nixos docs: Add a makefile for hacking on the nixos docs
This commit is contained in:
parent
59f8b1e844
commit
0ff0d138e4
8
nixos/doc/manual/Makefile
Normal file
8
nixos/doc/manual/Makefile
Normal file
@ -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 {
|
in rec {
|
||||||
|
inherit generatedSources;
|
||||||
|
|
||||||
# The NixOS options in JSON format.
|
# The NixOS options in JSON format.
|
||||||
optionsJSON = runCommand "options-json"
|
optionsJSON = runCommand "options-json"
|
||||||
|
@ -39,7 +39,8 @@
|
|||||||
|
|
||||||
<appendix xml:id="ch-options">
|
<appendix xml:id="ch-options">
|
||||||
<title>Configuration Options</title>
|
<title>Configuration Options</title>
|
||||||
<xi:include href="./generated/options-db.xml" />
|
<xi:include href="./generated/options-db.xml"
|
||||||
|
xpointer="configuration-variable-list" />
|
||||||
</appendix>
|
</appendix>
|
||||||
|
|
||||||
<xi:include href="release-notes/release-notes.xml" />
|
<xi:include href="release-notes/release-notes.xml" />
|
||||||
|
@ -15,9 +15,9 @@
|
|||||||
|
|
||||||
|
|
||||||
<xsl:template match="/expr/list">
|
<xsl:template match="/expr/list">
|
||||||
|
<appendix>
|
||||||
<variablelist>
|
<title>Configuration Options</title>
|
||||||
|
<variablelist xml:id="configuration-variable-list">
|
||||||
<xsl:for-each select="attrs">
|
<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, '*', '_'), '<', '_'), '>', '_'), '?', '_'))" />
|
<xsl:variable name="id" select="concat('opt-', str:replace(str:replace(str:replace(str:replace(attr[@name = 'name']/string/@value, '*', '_'), '<', '_'), '>', '_'), '?', '_'))" />
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
@ -100,7 +100,7 @@
|
|||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
</appendix>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
|
||||||
|
@ -124,7 +124,6 @@ let
|
|||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
in rec {
|
in rec {
|
||||||
|
|
||||||
channel = import lib/make-channel.nix { inherit pkgs nixpkgs version versionSuffix; };
|
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);
|
manual = buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.manual);
|
||||||
manualEpub = (buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.manualEpub));
|
manualEpub = (buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.manualEpub));
|
||||||
manpages = buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.manpages);
|
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;
|
options = (buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.optionsJSON)).x86_64-linux;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user