From 570708183b74972932425ac1786f4fcd757ad99f Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Thu, 8 Dec 2016 17:32:27 +0100 Subject: [PATCH] haskellPackages: add hoogleLocal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The docs in `hoogle.nix` intend for it to be in the packageset as `hoogleLocal` and that also makes a lot of sense from a user perspective. `packages` is not a function `HaskellPackages -> [Package]`, but rather an arbitrary set of packages. That is good, because that way it can be used e.g. to merge package databases from other versions of the packageset. It’s done as function with default argument, because otherwise the user has to use `overrideCabal` to override `packages` in `hoogle.nix`. --- pkgs/development/haskell-modules/configuration-common.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 6fb76bcfbee7..700f9d0dbb2d 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -18,6 +18,11 @@ self: super: { # Apply NixOS-specific patches. ghc-paths = appendPatch super.ghc-paths ./patches/ghc-paths-nix.patch; + # enable using a local hoogle with extra packagages in the database + # nix-shell -p "haskellPackages.hoogleLocal (with haskellPackages; [ mtl lens ])" + # $ hoogle server + hoogleLocal = { packages ? [] }: self.callPackage ./hoogle.nix { inherit packages; }; + # Break infinite recursions. clock = dontCheck super.clock; Dust-crypto = dontCheck super.Dust-crypto;