mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 22:32:58 +03:00
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 {
|
||||
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, '*', '_'), '<', '_'), '>', '_'), '?', '_'))" />
|
||||
<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…
Reference in New Issue
Block a user