Shoutout to nixpkgs! I was trying to get a local hoogle with haddock documentation, and after trying without luck stack then cabal I finally gave nix a serious try and it is working well so far. In particular it let me re-use the same dependencies across projects and the hoogle service correctly cross reference libraries documentation.
Though I struggled with using ghc.withHoogle until I found the shellFor function, for reference here is the default.nix
The command to start hoogle is: nix-shell --command "hoogle server -p 8080 --local --haskell". Then for emacs, using the M-x nix-shell function from nix-mode makes flycheck and run-haskell use the right env without fuss.
@codygman Thanks, I did tried direnv and nix-direnv, but it is still too slow when switching between buffer from different project and I prefer manually running the nix-shell function from the nix-mode when necessary.
Shoutout to nixpkgs! I was trying to get a local hoogle with haddock documentation, and after trying without luck
stack
thencabal
I finally gavenix
a serious try and it is working well so far. In particular it let me re-use the same dependencies across projects and the hoogle service correctly cross reference libraries documentation.Though I struggled with using ghc.withHoogle until I found the shellFor function, for reference here is the
default.nix
The command to start hoogle is:
nix-shell --command "hoogle server -p 8080 --local --haskell"
. Then for emacs, using theM-x nix-shell
function from nix-mode makes flycheck and run-haskell use the right env without fuss.awesome!
@tristanC you might like direnv-mode and the cached use_nix variant or lorri if the nix-shell command blocks too long
@codygman Thanks, I did tried direnv and nix-direnv, but it is still too slow when switching between buffer from different project and I prefer manually running the
nix-shell
function from thenix-mode
when necessary.Also since that initial expression, I am now also using nix to manage the IDE configuration: https://github.com/podenv/devenv