on iko/ghcjs-patch-master help sign in
Make sure hoogle is available in ghcWithHoogle (#196)
commitf81a37eda4163c90f1b3d7487e0f6bb24dd8403b authorRodney Lorrimar <rodney.lorrimar@iohk.io> dateTue 16 Jul 2019, 10:17 (7 years ago) parentebb2233
3 files changed+10−1
builder/ghc-for-component-wrapper.nix+3 builder/shell-for.nix+4−1 test/snapshots/default.nix+3
builder/ghc-for-component-wrapper.nix+3
@@ -11,6 +11,7 @@
1111
1212{ componentName # Full derivation name of the component
1313, configFiles # The component's "config" derivation
14+, postInstall ? ""
1415}:
1516
1617let
@@ -86,5 +87,7 @@ in runCommand "${componentName}-${ghc.name}" {
8687 makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "--global-package-db=${packageCfgDir}"
8788 fi
8889 done
90+
91+ ${postInstall}
8992 ''
9093)
builder/shell-for.nix+4−1
@@ -36,8 +36,11 @@ let
3636 inherit component;
3737 };
3838 ghcEnv = ghcForComponent {
39− componentName = name;
4039 inherit configFiles;
40+ componentName = name;
41+ postInstall = lib.optionalString withHoogle ''
42+ ln -s ${hoogleIndex}/bin/hoogle $out/bin
43+ '';
4144 };
4245
4346 hoogleIndex = let
test/snapshots/default.nix+3
@@ -23,6 +23,9 @@ in
2323 printf "checking that the ghcWithPackages env has the package...\n" >& 2
2424 ${env}/bin/ghc-pkg list | grep conduit
2525
26+ printf "checking that the ghcWithPackages env has a hoogle index...\n" >& 2
27+ ${env}/bin/hoogle search Conduit --count=100 | grep ConduitT
28+
2629 touch $out
2730 '';
2831