Skip to content

Commit

Permalink
haskell: add quickjump option to the haskell mkDerivation
Browse files Browse the repository at this point in the history
When visiting local documentation via hoogle, currently for most packages the
quickjump index is missing so you only get a sad error when pressing "s" to
search in the current documentation.

The quickjump option is only supported by the haddock utility that's shipped
with ghc 8.6.x or later.

Closes #75942.
  • Loading branch information
mgttlinger authored and peti committed Jan 5, 2020
1 parent 52134aa commit 1f4cf02
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/development/haskell-modules/generic-builder.nix
Expand Up @@ -24,6 +24,7 @@ in
, doCheck ? !isCross && stdenv.lib.versionOlder "7.4" ghc.version
, doBenchmark ? false
, doHoogle ? true
, doHaddockQuickjump ? doHoogle && stdenv.lib.versionAtLeast ghc.version "8.6"
, editedCabalFile ? null
, enableLibraryProfiling ? !(ghc.isGhcjs or false)
, enableExecutableProfiling ? false
Expand Down Expand Up @@ -402,6 +403,7 @@ stdenv.mkDerivation ({
${optionalString (doHaddock && isLibrary) ''
${setupCommand} haddock --html \
${optionalString doHoogle "--hoogle"} \
${optionalString doHaddockQuickjump "--quickjump"} \
${optionalString (isLibrary && hyperlinkSource) "--hyperlink-source"} \
${stdenv.lib.concatStringsSep " " haddockFlags}
''}
Expand Down

0 comments on commit 1f4cf02

Please sign in to comment.