We use Stackage snapshots, but prefer cabal for building.
For that, we take the cabal.project.freeze
file from Stackage (e.g.,
https://www.stackage.org/lts-21.19/cabal.config
) and copy it into the app
directory.
-
Install ghcup, use versions:
- HLS 2.7.0.0
- cabal 3.10.3.0
- GHC 9.4.8
-
Build project with
cabal build all
, or just a specific target you're working on. -
HLS should work with VSCode.
-
You can also build with Stack if you prefer.
At the moment this is not Dockerized.
You can build with Nix:
cd server && nix-build && cd -
Or manually with cabal
on the deployment machine:
# Example for Debian Bullseye
# GHCUP
apt install build-essential curl libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 pkg-config
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
# requires zlib
apt install zlib1g-dev
cabal build server:server-exe
Then create a systemd service file and start the server.