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;
|
defaultScope = mkScope self;
|
||||||
callPackage = drv: args: callPackageWithScope defaultScope drv args;
|
callPackage = drv: args: callPackageWithScope defaultScope drv args;
|
||||||
|
|
||||||
|
withPackages = packages: callPackage ./with-packages-wrapper.nix {
|
||||||
|
inherit (self) llvmPackages;
|
||||||
|
haskellPackages = self;
|
||||||
|
inherit packages;
|
||||||
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
import ./hackage-packages.nix { inherit pkgs stdenv callPackage; } self // {
|
import ./hackage-packages.nix { inherit pkgs stdenv callPackage; } self // {
|
||||||
|
|
||||||
inherit mkDerivation callPackage;
|
inherit mkDerivation callPackage;
|
||||||
|
|
||||||
ghcWithPackages = pkgs: callPackage ./with-packages-wrapper.nix {
|
ghcWithPackages = selectFrom: withPackages (selectFrom self);
|
||||||
inherit (self) llvmPackages;
|
|
||||||
haskellPackages = self;
|
|
||||||
packages = pkgs 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
|
chmod +x $out/bin/hoogle
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
isHaskellLibrary = false; # for the filter in ./with-packages-wrapper.nix
|
||||||
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "A local Hoogle database";
|
description = "A local Hoogle database";
|
||||||
platforms = ghc.meta.platforms;
|
platforms = ghc.meta.platforms;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user