servant/nix
Gaël Deest 910a3ae7ec Upgrade GHCJS to 8.6
This allows us to deprecate GHCJS 8.4 (which makes sense, as vanilla GHC
< 8.6 is already deprecated).

We re-use GHCJS from reflex-platform, which unfortunately isn't
up-to-date with latest GHC and is only 8.6. The benefit of using
reflex-platform is that it provides nix expressions for GHCJS + a binary
nix cache.

reflex-platform patches text to use a JS-String based internal
representation for performance reasons, so we provide a few haskell
dependencies from reflex-platform as well:

- hashable
- attoparsec

As those rely on text's internal representation but have been patched
for reflex-platform.
2021-10-10 22:53:26 +02:00
..
nixpkgs.json Build servant repo with nix. (#1288) 2020-06-06 00:04:32 -04:00
nixpkgs.nix Upgrade GHCJS to 8.6 2021-10-10 22:53:26 +02:00
README.md GHC9 mention in Nix README. 2021-10-02 17:48:45 +02:00
shell.nix Upgrade GHCJS to 8.6 2021-10-10 22:53:26 +02: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:

$ nix-shell nix/shell.nix

Everything needed for the tutorial and the cookbook too:

$ nix-shell nix/shell.nix --arg tutorial true

The shell.nix file also supports specifying a particular ghc version, e.g:

$ nix-shell nix/shell.nix --argstr compiler ghcHEAD

Possible GHC versions

  • ghc865Binary
  • ghc884
  • ghc8104 - default
  • ghc901

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>