summary refs log tree commit diff
path: root/nixos/doc/manual/default.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-11-17 13:41:18 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-11-17 15:17:39 +0100
commit8b79cc00bfbe9528b7bb752a4975849c3cdf982a (patch)
treec5b9d60c9d1d2df5b75b4e77693b053a00a8a3c1 /nixos/doc/manual/default.nix
parent0a34445d7443118d51b339e88e5184ed70a61b9b (diff)
downloadnixpkgs-8b79cc00bfbe9528b7bb752a4975849c3cdf982a.tar
nixpkgs-8b79cc00bfbe9528b7bb752a4975849c3cdf982a.tar.gz
nixpkgs-8b79cc00bfbe9528b7bb752a4975849c3cdf982a.tar.bz2
nixpkgs-8b79cc00bfbe9528b7bb752a4975849c3cdf982a.tar.lz
nixpkgs-8b79cc00bfbe9528b7bb752a4975849c3cdf982a.tar.xz
nixpkgs-8b79cc00bfbe9528b7bb752a4975849c3cdf982a.tar.zst
nixpkgs-8b79cc00bfbe9528b7bb752a4975849c3cdf982a.zip
Manual: Don't depend on the JSON options
Diffstat (limited to 'nixos/doc/manual/default.nix')
-rw-r--r--nixos/doc/manual/default.nix48
1 files changed, 21 insertions, 27 deletions
diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix
index 68248081af6..ea1d8ffc7de 100644
--- a/nixos/doc/manual/default.nix
+++ b/nixos/doc/manual/default.nix
@@ -30,34 +30,13 @@ let
     else
       fn;
 
-  # Convert the list of options into an XML file and a JSON file.  The builtin
-  # unsafeDiscardStringContext is used to prevent the realisation of the store
-  # paths which are used in options definitions.
+  # Convert the list of options into an XML file.  The builtin
+  # unsafeDiscardStringContext is used to prevent the realisation of
+  # the store paths which are used in options definitions.
   optionsXML = builtins.toFile "options.xml" (builtins.unsafeDiscardStringContext (builtins.toXML optionsList'));
-  optionsJSON = builtins.toFile "options.json" (builtins.unsafeDiscardStringContext (builtins.toJSON optionsList'));
-
-  # Tools-friendly version of the list of NixOS options.
-  options' = stdenv.mkDerivation {
-    name = "options";
-
-    buildCommand = ''
-      # Export list of options in different format.
-      dst=$out/share/doc/nixos
-      mkdir -p $dst
-
-      cp ${optionsJSON} $dst/options.json
-      cp ${optionsXML} $dst/options.xml
-
-      mkdir -p $out/nix-support
-      echo "file json $dst/options.json" >> $out/nix-support/hydra-build-products
-      echo "file xml $dst/options.xml" >> $out/nix-support/hydra-build-products
-    ''; # */
-
-    meta.description = "List of NixOS options in various formats.";
-  };
 
   optionsDocBook = runCommand "options-db.xml" {} ''
-    optionsXML=${options'}/share/doc/nixos/options.xml
+    optionsXML=${optionsXML}
     if grep /nixpkgs/nixos/modules $optionsXML; then
       echo "The manual appears to depend on the location of Nixpkgs, which is bad"
       echo "since this prevents sharing via the NixOS channel.  This is typically"
@@ -83,8 +62,23 @@ let
 
 in rec {
 
-  # Tools-friendly version of the list of NixOS options.
-  options = options';
+  # The NixOS options in JSON format.
+  optionsJSON = stdenv.mkDerivation {
+    name = "options-json";
+
+    buildCommand = ''
+      # Export list of options in different format.
+      dst=$out/share/doc/nixos
+      mkdir -p $dst
+
+      cp ${builtins.toFile "options.json" (builtins.unsafeDiscardStringContext (builtins.toJSON optionsList'))} $dst/options.json
+
+      mkdir -p $out/nix-support
+      echo "file json $dst/options.json" >> $out/nix-support/hydra-build-products
+    ''; # */
+
+    meta.description = "List of NixOS options in JSON format";
+  };
 
   # Generate the NixOS manual.
   manual = stdenv.mkDerivation {