Pass 'mathjax' to Haddock
authorIlias Tsitsimpis <iliastsi@debian.org>
Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)
committerIlias Tsitsimpis <iliastsi@debian.org>
Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)
Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/23625

Hadrian currently doesn't allow us to modify Haddock options, so
patch Hadrian to manually pass the 'mathjax' option.

Gbp-Pq: Name hadrian-haddock-opts

hadrian/src/Settings/Builders/Haddock.hs

index 38c786de430f56a35240ef170a4085a86d89b7e3..e0fdac7aa024255e1e528c937d45e23b1f431499 100644 (file)
@@ -32,6 +32,7 @@ haddockBuilderArgs = mconcat
             , arg "-o", arg $ takeDirectory output
             , arg "-t", arg "Haskell Hierarchical Libraries"
             , arg "-p", arg "libraries/prologue.txt"
+            , arg "--mathjax=file:///usr/share/javascript/mathjax/MathJax.js"
             , pure [ "--read-interface="
                      ++ (takeFileName . takeDirectory) haddock
                      ++ "," ++ haddock | haddock <- inputs ] ]
@@ -60,6 +61,7 @@ haddockBuilderArgs = mconcat
             , arg "--hyperlinked-source"
             , arg "--hoogle"
             , arg "--quickjump"
+            , arg "--mathjax=file:///usr/share/javascript/mathjax/MathJax.js"
             , arg $ "--title=" ++ pkgName pkg ++ "-" ++ version
                     ++ ": " ++ synopsis
             , arg $ "--prologue=" ++ takeDirectory output -/- "haddock-prologue.txt"