2017-12-02 01:12:47 +01:00
|
|
|
You can use the `shell.nix` from this directory
|
|
|
|
to build the servant packages or even the tutorial
|
|
|
|
or cookbook if you want to, optionally.
|
|
|
|
|
|
|
|
Just the servant packages:
|
|
|
|
|
|
|
|
``` sh
|
|
|
|
$ nix-shell nix/shell.nix
|
|
|
|
```
|
|
|
|
|
|
|
|
Everything needed for the tutorial and the
|
|
|
|
cookbook too:
|
|
|
|
|
|
|
|
``` sh
|
|
|
|
$ nix-shell nix/shell.nix --arg tutorial true
|
|
|
|
```
|
|
|
|
|
|
|
|
The `shell.nix` file also supports specifying
|
|
|
|
a particular ghc version, e.g:
|
|
|
|
|
|
|
|
``` sh
|
|
|
|
$ nix-shell nix/shell.nix --argstr compiler ghcHEAD
|
|
|
|
```
|
2021-04-09 17:09:03 +02:00
|
|
|
|
|
|
|
**Possible GHC versions**
|
2021-09-12 10:49:43 +02:00
|
|
|
- `ghc865Binary`
|
2021-04-09 17:09:03 +02:00
|
|
|
- `ghc884`
|
2021-09-12 10:49:43 +02:00
|
|
|
- `ghc8104` - default
|
2021-09-07 14:21:13 +02:00
|
|
|
- `ghc901`
|
2021-09-12 10:49:43 +02:00
|
|
|
|
|
|
|
### Cabal users
|
|
|
|
|
|
|
|
GHC version can be chosen via the nix-shell parameter
|
|
|
|
|
|
|
|
`cabal build all`
|
|
|
|
|
|
|
|
### Stack version
|
|
|
|
|
|
|
|
Since the ghc version is set by the LTS version, it is preferable to use the `ghc8104` version parameter for the nix-shell.
|
|
|
|
|
|
|
|
`stack --no-nix --system-ghc <command>`
|