Extend nix explanations in README (#549)

* Extend nix explanations in README

* Correct ghcide-nix url

Co-authored-by: Domen Kožar <domen@enlambda.com>

Co-authored-by: Domen Kožar <domen@enlambda.com>
This commit is contained in:
maralorn 2020-05-13 19:46:45 +02:00 committed by GitHub
parent 5661348b5e
commit 5ac6e200c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,17 @@ There are more details about our approach [in this blog post](https://4ta.uk/p/s
#### With Nix
[See ghcide-nix repository](https://github.com/hercules-ci/ghcide-nix)
Note that you need to compile `ghcide` with the same `ghc` as the project you are working on.
1. If the `ghc` you are using matches the version (or better is) from `nixpkgs` its easiest to use the `ghcide` from `nixpkgs`. You can do so via
```
nix-env -iA haskellPackages.ghcide
```
or e.g. including `pkgs.haskellPackages.ghcide` in your projects `shell.nix`.
Depending on your `nixpkgs` channel that might not be the newest `ghcide`, though.
2. If your `ghc` does not match nixpkgs you should try the [ghcide-nix repository](https://github.com/cachix/ghcide-nix)
which provides a `ghcide` via the `haskell.nix` infrastructure.
#### With Cabal or Stack