on iko/ghcjs-patch-master help sign in
Make sure hoogle is available in ghcWithHoogle (#196)
f81a37eRodney Lorrimar
builder/ghc-for-component-wrapper.nix+3
@@ -11,6 +11,7 @@
11
11
12{ componentName # Full derivation name of the component
12{ componentName # Full derivation name of the component
13, configFiles # The component's "config" derivation
13, configFiles # The component's "config" derivation
14+, postInstall ? ""
14}:
15}:
15
16
16let
17let
@@ -86,5 +87,7 @@ in runCommand "${componentName}-${ghc.name}" {
86 makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "--global-package-db=${packageCfgDir}"
87 makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "--global-package-db=${packageCfgDir}"
87 fi
88 fi
88 done
89 done
90+
91+ ${postInstall}
89 ''
92 ''
90)
93)
builder/shell-for.nix+4−1
@@ -36,8 +36,11 @@ let
36 inherit component;
36 inherit component;
37 };
37 };
38 ghcEnv = ghcForComponent {
38 ghcEnv = ghcForComponent {
39− componentName = name;
40 inherit configFiles;
39 inherit configFiles;
40+ componentName = name;
41+ postInstall = lib.optionalString withHoogle ''
42+ ln -s ${hoogleIndex}/bin/hoogle $out/bin
43+ '';
41 };
44 };
42
45
43 hoogleIndex = let
46 hoogleIndex = let
test/snapshots/default.nix+3
@@ -23,6 +23,9 @@ in
23 printf "checking that the ghcWithPackages env has the package...\n" >& 2
23 printf "checking that the ghcWithPackages env has the package...\n" >& 2
24 ${env}/bin/ghc-pkg list | grep conduit
24 ${env}/bin/ghc-pkg list | grep conduit
25
25
26+ printf "checking that the ghcWithPackages env has a hoogle index...\n" >& 2
27+ ${env}/bin/hoogle search Conduit --count=100 | grep ConduitT
28+
26 touch $out
29 touch $out
27 '';
30 '';
28
31