haskell-packages: bring hoogle to the masses by imlementing ghcWithHoogle
Replace `ghcWithPackages` to `ghcWithHoogle` in your config and enjoy.
This commit is contained in:
parent
0ccf8eae2f
commit
d8487667cf
|
@ -47,18 +47,29 @@ let
|
|||
defaultScope = mkScope self;
|
||||
callPackage = drv: args: callPackageWithScope defaultScope drv args;
|
||||
|
||||
withPackages = packages: callPackage ./with-packages-wrapper.nix {
|
||||
inherit (self) llvmPackages;
|
||||
haskellPackages = self;
|
||||
inherit packages;
|
||||
};
|
||||
|
||||
in
|
||||
import ./hackage-packages.nix { inherit pkgs stdenv callPackage; } self // {
|
||||
|
||||
inherit mkDerivation callPackage;
|
||||
|
||||
ghcWithPackages = pkgs: callPackage ./with-packages-wrapper.nix {
|
||||
inherit (self) llvmPackages;
|
||||
haskellPackages = self;
|
||||
packages = pkgs self;
|
||||
};
|
||||
ghcWithPackages = selectFrom: withPackages (selectFrom self);
|
||||
|
||||
ghc = ghc // { withPackages = self.ghcWithPackages; };
|
||||
ghcWithHoogle = selectFrom:
|
||||
let
|
||||
packages = selectFrom self;
|
||||
hoogle = callPackage ./hoogle.nix { inherit packages; };
|
||||
in withPackages (packages ++ [ hoogle ]);
|
||||
|
||||
ghc = ghc // {
|
||||
withPackages = self.ghcWithPackages;
|
||||
withHoogle = self.ghcWithHoogle;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -98,6 +98,10 @@ stdenv.mkDerivation {
|
|||
chmod +x $out/bin/hoogle
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
isHaskellLibrary = false; # for the filter in ./with-packages-wrapper.nix
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "A local Hoogle database";
|
||||
platforms = ghc.meta.platforms;
|
||||
|
|
Loading…
Reference in New Issue