summary refs log tree commit diff
path: root/nixos/doc/manual/default.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2016-04-14 21:31:02 +0200
committeraszlig <aszlig@redmoonstudios.org>2016-04-14 21:31:02 +0200
commitc36d6e59647794aa1c4dbb2dcd7e5242d9c5b6b8 (patch)
tree62903a9404e68920852d549edb62d7f8c4ee7abc /nixos/doc/manual/default.nix
parent940120a711930eab13883f56c677cf2a4580b14e (diff)
downloadnixpkgs-c36d6e59647794aa1c4dbb2dcd7e5242d9c5b6b8.tar
nixpkgs-c36d6e59647794aa1c4dbb2dcd7e5242d9c5b6b8.tar.gz
nixpkgs-c36d6e59647794aa1c4dbb2dcd7e5242d9c5b6b8.tar.bz2
nixpkgs-c36d6e59647794aa1c4dbb2dcd7e5242d9c5b6b8.tar.lz
nixpkgs-c36d6e59647794aa1c4dbb2dcd7e5242d9c5b6b8.tar.xz
nixpkgs-c36d6e59647794aa1c4dbb2dcd7e5242d9c5b6b8.tar.zst
nixpkgs-c36d6e59647794aa1c4dbb2dcd7e5242d9c5b6b8.zip
nixos/doc: Revert allowing olinks from options
This reverts commit 1d77dcaed37ab47bfe2d90711c01b475a514ff25.

It will be reintroduced along with #14700 as a separate branch, as
suggested by @nbp.

I added this to this branch because I thought it was a necessary
dependency, but it turns out that the build of the manual/manpages still
succeeds and merely prints a warning like this:

warning: failed to load external entity "olinkdb.xml"
Olink error: could not open target database 'olinkdb.xml'.
Error: unresolved olink: targetdoc/targetptr = 'manual/module-taskserver'.

The olink itself will be replaced by "???", so users looking at the
description of the option in question will still see the reference to
the NixOS manual, like this:

More instructions about NixOS in conjuction with Taskserver can be found
in the NixOS manual at ???.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'nixos/doc/manual/default.nix')
-rw-r--r--nixos/doc/manual/default.nix75
1 files changed, 13 insertions, 62 deletions
diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix
index 6261f83ac8b..130b016aa26 100644
--- a/nixos/doc/manual/default.nix
+++ b/nixos/doc/manual/default.nix
@@ -73,63 +73,6 @@ let
       </toc>
     '';
 
-  manualXsltprocOptions = toString [
-    "--param section.autolabel 1"
-    "--param section.label.includes.component.label 1"
-    "--stringparam html.stylesheet style.css"
-    "--param xref.with.number.and.title 1"
-    "--param toc.section.depth 3"
-    "--stringparam admon.style ''"
-    "--stringparam callout.graphics.extension .gif"
-    "--stringparam current.docid manual"
-    "--param chunk.section.depth 0"
-    "--param chunk.first.sections 1"
-    "--param use.id.as.filename 1"
-    "--stringparam generate.toc 'book toc appendix toc'"
-    "--stringparam chunk.toc ${toc}"
-  ];
-
-  olinkDB = stdenv.mkDerivation {
-    name = "manual-olinkdb";
-
-    inherit sources;
-
-    buildInputs = [ libxml2 libxslt ];
-
-    buildCommand = ''
-      ${copySources}
-
-      xsltproc \
-        ${manualXsltprocOptions} \
-        --stringparam collect.xref.targets only \
-        --stringparam targets.filename "$out/manual.db" \
-        --nonet --xinclude \
-        ${docbook5_xsl}/xml/xsl/docbook/xhtml/chunktoc.xsl \
-        ./manual.xml
-
-      # Check the validity of the man pages sources.
-      xmllint --noout --nonet --xinclude --noxincludenode \
-        --relaxng ${docbook5}/xml/rng/docbook/docbook.rng \
-        ./man-pages.xml
-
-      cat > "$out/olinkdb.xml" <<EOF
-      <?xml version="1.0" encoding="utf-8"?>
-      <!DOCTYPE targetset SYSTEM
-        "file://${docbook5_xsl}/xml/xsl/docbook/common/targetdatabase.dtd" [
-        <!ENTITY manualtargets SYSTEM "file://$out/manual.db">
-      ]>
-      <targetset>
-        <targetsetinfo>
-            Allows for cross-referencing olinks between the manpages
-            and the HTML/PDF manuals.
-        </targetsetinfo>
-
-        <document targetdoc="manual">&manualtargets;</document>
-      </targetset>
-      EOF
-    '';
-  };
-
 in rec {
 
   # The NixOS options in JSON format.
@@ -172,8 +115,18 @@ in rec {
       dst=$out/share/doc/nixos
       mkdir -p $dst
       xsltproc \
-        ${manualXsltprocOptions} \
-        --stringparam target.database.document "${olinkDB}/olinkdb.xml" \
+        --param section.autolabel 1 \
+        --param section.label.includes.component.label 1 \
+        --stringparam html.stylesheet style.css \
+        --param xref.with.number.and.title 1 \
+        --param toc.section.depth 3 \
+        --stringparam admon.style "" \
+        --stringparam callout.graphics.extension .gif \
+        --param chunk.section.depth 0 \
+        --param chunk.first.sections 1 \
+        --param use.id.as.filename 1 \
+        --stringparam generate.toc "book toc appendix toc" \
+        --stringparam chunk.toc ${toc} \
         --nonet --xinclude --output $dst/ \
         ${docbook5_xsl}/xml/xsl/docbook/xhtml/chunktoc.xsl ./manual.xml
 
@@ -205,7 +158,6 @@ in rec {
       dst=$out/share/doc/nixos
       mkdir -p $dst
       xmllint --xinclude manual.xml | dblatex -o $dst/manual.pdf - \
-        -P target.database.document="${olinkDB}/olinkdb.xml" \
         -P doc.collab.show=0 \
         -P latex.output.revhistory=0
 
@@ -225,7 +177,7 @@ in rec {
     buildCommand = ''
       ${copySources}
 
-      # Check the validity of the man pages sources.
+      # Check the validity of the manual sources.
       xmllint --noout --nonet --xinclude --noxincludenode \
         --relaxng ${docbook5}/xml/rng/docbook/docbook.rng \
         ./man-pages.xml
@@ -237,7 +189,6 @@ in rec {
         --param man.output.base.dir "'$out/share/man/'" \
         --param man.endnotes.are.numbered 0 \
         --param man.break.after.slash 1 \
-        --stringparam target.database.document "${olinkDB}/olinkdb.xml" \
         ${docbook5_xsl}/xml/xsl/docbook/manpages/docbook.xsl \
         ./man-pages.xml
     '';