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.nixEverything needed for the tutorial and the cookbook too:
$ nix-shell nix/shell.nix --arg tutorial trueThe shell.nix file also supports specifying
a particular ghc version, e.g:
$ nix-shell nix/shell.nix --argstr compiler ghcHEADThe default is ghc92.
To check which which ghc compiler options are available:
$ nix-env -f nix/nixpkgs.nix -qaP -A haskell.compilerIf you prefer to use flakes, the flake.nix file provides an
equivalent default devShell to shell.nix. In addition, the
tutorial is provided as a separate flake output:
$ nix develop .#tutorialGHC version can be chosen via the nix-shell parameter
cabal build all
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>