To add a new Haskell project¶
To add a new Haskell project, you should do the following:
Create the project in the usual way. It should have an appropriate
Add the project to the top-level stack.yaml, configuring dependencies etc as needed. If your project’s configuration deviates too far from the snapshot in ``cardano-prelude`, then you may have to submit a PR there to update that snapshot.
At this point, test that your new project builds using
stack build <project_name>.
Run nix-shell ./nix -A iohkNix.stack-cabal-sync-shell –run scripts/stack-cabal_config_check.sh script to check and report your change from stack.yaml to cabal.project.
Run the regenerate script to update sha256 checksums in cabal.project.
Test that you can build your new project by running the following:
nix build -f default.nix libs.<project_name>. If you have executables, then you may also try building these using the
exes.<executable_name>attribute path. A good way to see what’s available is to execute
nix repl. This will allow you to explore the potential attribute names.
If you want your product to be tested by CI, add it to release.nix using the format specified in that file.