haskellPackages: add hoogleLocal

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`.
wip/yesman
Profpatsch 8 years ago
parent a2210a9efd
commit 570708183b
  1. 5
      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;

Loading…
Cancel
Save