Shpadoinkle is built with Nix, but you can build however you like.
cabal are supported with or without Nix.
The fastest way to start a new Shpadoinkle project is to build a Snowman. The following command will setup a new "hello world" project for you.
bash <( curl https://gitlab.com/fresheyeball/Shpadoinkle-snowman/-/raw/master/generator.sh )
Once you have your new project you can get live reloads with the following command:
nix-shell --command "ghcid --command 'cabal repl' -W -T Main.dev"
This will use
nix-shell to setup a development environment for you, then execute
ghcid inside the environment to watch your files, and execute
Main.dev inside a repl. You can see results at
localhost:8080. Of course you must have Nix installed for
nix-shell to work.
Building from source can take a long time. If you run with
Nix works on all Linux distributions, as well as Darwin-based operating systems such as MacOS. To install Nix run:
curl -L https://nixos.org/nix/install | sh
👏 Follow 👏 InstructionsThe install script outputs important instructions you need to follow. Read the output and follow instructions.
Success is indicated by the presence of the Nix toolchain in your terminal…
Some of the work done with Nix includes deviations from the official Nix package set. As such, some dependencies are not cached on cache.nixos.org. Building these dependencies from source can be very slow. If you would like to avoid this wait, you can pull from our Cachix cache of pre-built dependencies by executing the following:
nix-env -iA cachix -f https://cachix.org/api/v1/install cachix use shpadoinkle
After executing the above, subsequent builds will use cached dependencies from shpadoinkle.cachix.org, which are kept up to date with
master using GitLab CI.