Skip to content

Commit 0b5d336

Browse files
committed
Enable Hoogle for local packages
It rebuilds GHC, but is worth it to have a Hoogle server.
1 parent 27c18a4 commit 0b5d336

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

nix/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ and run `sudo nixos-rebuild switch` afterward.
3131

3232
It is _not_ recommended to add your user to `trusted-users`. This _can_ make enabling flake configurations simpler (like the Unison Nix cache here), but [it is equivalent to giving that user root access (without need for sudo)](https://nix.dev/manual/nix/2.23/command-ref/conf-file.html#conf-trusted-users).
3333

34+
## exploring the project
35+
36+
``` bash
37+
nix develop --command hoogle server --local
38+
```
39+
40+
will run a [Hoogle](github.com/ndmitchell/hoogle#readme) server at http://127.0.0.1:8080 with all of the Unison code & dependencies available.
41+
3442
## Building package components with nix
3543

3644
### Build the unison executable

nix/haskell-nix-flake.nix

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,8 @@ in
9292
defaultPackage = haskell-nix-flake.packages."unison-cli-main:exe:unison";
9393

9494
devShells = let
95-
mkDevShell = pkg:
96-
shellFor {
97-
packages = _hpkgs: [pkg];
98-
## Enabling Hoogle causes us to rebuild GHC.
99-
withHoogle = false;
100-
};
95+
mkDevShell = pkg: shellFor {packages = _hpkgs: [pkg];};
10196
in
102-
{
103-
local = shellFor {
104-
packages = _hpkgs: builtins.attrValues localPackages;
105-
withHoogle = false;
106-
};
107-
}
97+
{local = shellFor {packages = _hpkgs: builtins.attrValues localPackages;};}
10898
// pkgs.lib.mapAttrs (_name: mkDevShell) localPackages;
10999
}

0 commit comments

Comments
 (0)