diff options
author | Leonid Onokhov <sopvop@gmail.com> | 2017-12-20 14:22:05 +0000 |
---|---|---|
committer | Leonid Onokhov <sopvop@gmail.com> | 2017-12-20 14:22:05 +0000 |
commit | 574528024dd8cebd86e52d8f8f0033663651c5b3 (patch) | |
tree | e88d3dc57c987e8e9438d13418c6c16c6b836b84 /doc/default.nix | |
parent | 61da89bc8a5490c06642f6ff4b9a6ea61e5dc13b (diff) |
nixpkgs/manual: fix build with new pandoc
Diffstat (limited to 'doc/default.nix')
-rw-r--r-- | doc/default.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/default.nix b/doc/default.nix index cfd51fba257e..e3d7ef2ef9d6 100644 --- a/doc/default.nix +++ b/doc/default.nix @@ -23,11 +23,12 @@ pkgs.stdenv.mkDerivation { buildCommand = let toDocbook = { useChapters ? false, inputFile, outputFile }: let - extraHeader = ''xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" ''; + extraHeader = lib.optionalString (!useChapters) + ''xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" ''; in '' { - pandoc '${inputFile}' -w docbook ${lib.optionalString useChapters "--top-level-division=chapter"} \ - --smart \ + pandoc '${inputFile}' -w docbook+smart ${lib.optionalString useChapters "--top-level-division=chapter"} \ + -f markdown+smart \ | sed -e 's|<ulink url=|<link xlink:href=|' \ -e 's|</ulink>|</link>|' \ -e 's|<sect. id=|<section xml:id=|' \ |