app_version := `sed -n 's/^version: *\(.*\)/\1/p' ./datatypetool.cabal` # Print available commands @help: just --justfile {{justfile()}} --list # Enter a Nix shell. @shell: nix-shell --pure --show-trace # Format all the things @format: fourmolu -i {{ justfile_directory() }}/. && \ stylish-haskell -ir {{ justfile_directory() }} && \ cabal-fmt -i {{ justfile_directory() }}/datatypetool.cabal && \ nixfmt shell.nix nix/* # Experimental # just --unstable --fmt # Run the app with cabal @run *args: cabal run datatypetool -- {{args}} # Build, then run from the heavily-nested dist directory. This command breaks if the version changes, so change this command appropriately. # @build_and_run *args: # cabal build && ./dist-newstyle/build/x86_64-linux/ghc-9.8.2/datatypetool-0.1.0.0/x/datatypetool/build/datatypetool/datatypetool