From 0ff0d138e4e9d68853c463a540d61718aa91cffb Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Sat, 28 Apr 2018 04:00:55 -0400 Subject: [PATCH] nixos docs: Add a makefile for hacking on the nixos docs --- nixos/doc/manual/Makefile | 8 ++++++++ nixos/doc/manual/default.nix | 1 + nixos/doc/manual/manual.xml | 3 ++- nixos/doc/manual/options-to-docbook.xsl | 8 ++++---- nixos/release.nix | 2 +- 5 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 nixos/doc/manual/Makefile diff --git a/nixos/doc/manual/Makefile b/nixos/doc/manual/Makefile new file mode 100644 index 000000000000..b15fbaa270fc --- /dev/null +++ b/nixos/doc/manual/Makefile @@ -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 diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix index c396c799c638..2c6309474b37 100644 --- a/nixos/doc/manual/default.nix +++ b/nixos/doc/manual/default.nix @@ -229,6 +229,7 @@ let ''; in rec { + inherit generatedSources; # The NixOS options in JSON format. optionsJSON = runCommand "options-json" diff --git a/nixos/doc/manual/manual.xml b/nixos/doc/manual/manual.xml index a7825579e03d..676924e5c8b2 100644 --- a/nixos/doc/manual/manual.xml +++ b/nixos/doc/manual/manual.xml @@ -39,7 +39,8 @@ Configuration Options - + diff --git a/nixos/doc/manual/options-to-docbook.xsl b/nixos/doc/manual/options-to-docbook.xsl index 7b45b233ab2a..43a69806a2b0 100644 --- a/nixos/doc/manual/options-to-docbook.xsl +++ b/nixos/doc/manual/options-to-docbook.xsl @@ -15,9 +15,9 @@ - - - + + Configuration Options + @@ -100,7 +100,7 @@ - + diff --git a/nixos/release.nix b/nixos/release.nix index 2f779280e6b2..4994cd98302f 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -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;