From 900a378245d6853dbd08de065eb180fdf58e0388 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Merlin=20G=C3=B6ttlinger?= Date: Thu, 19 Dec 2019 14:41:11 +0100 Subject: [PATCH] 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. --- pkgs/development/haskell-modules/generic-builder.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index 2ae33138696..5410fccf0bb 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} ''}