about summary refs log tree commit diff
path: root/pkgs/development/haskell-modules
diff options
context:
space:
mode:
authorMerlin Göttlinger <megoettlinger@gmail.com>2019-12-19 14:41:11 +0100
committerPeter Simons <simons@cryp.to>2020-01-10 20:56:20 +0100
commit900a378245d6853dbd08de065eb180fdf58e0388 (patch)
tree61a32e7ac99eff8ec3c1e89c9610fdc400f975b5 /pkgs/development/haskell-modules
parentd8cf98b9c8b72a61bf2d632664c3e092f74b58ac (diff)
downloadnixlib-900a378245d6853dbd08de065eb180fdf58e0388.tar
nixlib-900a378245d6853dbd08de065eb180fdf58e0388.tar.gz
nixlib-900a378245d6853dbd08de065eb180fdf58e0388.tar.bz2
nixlib-900a378245d6853dbd08de065eb180fdf58e0388.tar.lz
nixlib-900a378245d6853dbd08de065eb180fdf58e0388.tar.xz
nixlib-900a378245d6853dbd08de065eb180fdf58e0388.tar.zst
nixlib-900a378245d6853dbd08de065eb180fdf58e0388.zip
haskell: add quickjump option to the haskell mkDerivation
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 https://github.com/NixOS/nixpkgs/pull/75942.
Diffstat (limited to 'pkgs/development/haskell-modules')
-rw-r--r--pkgs/development/haskell-modules/generic-builder.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix
index 2ae331386963..5410fccf0bb4 100644
--- a/pkgs/development/haskell-modules/generic-builder.nix
+++ b/pkgs/development/haskell-modules/generic-builder.nix
@@ -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
@@ -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}
     ''}