@@ -27,13 +27,16 @@ GarganText Project: this repo builds the backend for the frontend server built b
Disclaimer: since this project is still in development, this document remains in progress. Please report and improve this documentation if you encounter any issues.
This project can be built with either Stack or Cabal. For historical reasons, we generate a `cabal.project` from the `stack.yaml`, and we do not commit the former to the repo, to have a single "source of truth".
...
...
@@ -50,7 +53,7 @@ sh <(curl -L https://nixos.org/nix/install) --daemon
Verify the installation is complete with
```shell
nix-env --version
nix-env (Nix) 2.11.0
nix-env (Nix) 2.16.0
```
**Important:** Before building the project with either `stack` or `cabal` you need to be in the correct Nix shell, which will fetch all the required system dependencies. To do so, just type:
...
...
@@ -61,9 +64,31 @@ nix-shell
This will take a bit of time the first time.
#### Build
#### Build: choose cabal (new) or stack (old)
##### Build with Stack (old method)
#### With Cabal (recommanded)
First, into `nix-shell`:
```shell
cabal update
cabal install
```
Once you have a valid version of `cabal`, building requires generating a valid `cabal.project`. This can be done by installing `stack2cabal`: