A version of nix supporting flakes. The flake.lock
file locks
versions for all dependencies. โฆ well, except those required for
testing with cabal test
. The Haskell package doctest-parallel was
broken in nixpkgs at the time, so flake.nix
just ignores tests.
nix run . -- --help
Step into shell with dependencies, like ghc, cabal and the Haskell
packages from adventofcode2021.cabal
nix develop
Hack away at lib/Day01.hs until it passes tests for that day.
# Stays up, reloading when files change.
ghcid -T Day01.test
Alternatively, run full test suite with cabal.
cabal test
Run the first task of the first day.
cabal run exe:adventofcode2021 -- -d 1 -t run1 -i data/day01/example_input.txt