A flake-parts Nix module for Haskell development
Go to file
Sridhar Ratnakumar 47437fbb88
Add automated test (#60)
- Add `./test` that aims to use all features of haskell-flake
- Add `./test/test.sh` that verifies that the devshell of `./test` is as one would expect
- Add `./runtest.sh` at project root to run the full test
- Run the same ^ in Github Actions

I'm *not* entirely happy with this approach; in particular, `test.sh` seems pretty hacky. But it works. Not sure if it will scale.
2023-02-01 14:52:39 -05:00
.github/workflows Add automated test (#60) 2023-02-01 14:52:39 -05:00
example Add flake template & test in Github Actions (#54) 2023-01-11 13:01:50 -05:00
test Add automated test (#60) 2023-02-01 14:52:39 -05:00
.gitignore Add automated test (#60) 2023-02-01 14:52:39 -05:00
flake-module.nix Make package sources independent 2023-01-18 15:26:10 +01:00
flake.nix Add flake template & test in Github Actions (#54) 2023-01-11 13:01:50 -05:00
LICENSE Initial commit 2022-05-30 09:01:58 -04:00
README.md readme: Fix link for callCabal2nix/shellFor 2023-01-31 17:45:09 -05:00
runtest.sh Add automated test (#60) 2023-02-01 14:52:39 -05:00

haskell-flake

A flake-parts Nix module for Haskell development.

Why?

To keep flake.nix smaller (see examples below) and declarative (what vs how) by bringing a NixOS-like module system to flakes (through flake-parts).

Usage

To use haskell-flake in your Haskell projects, run:

nix flake init -t github:srid/haskell-flake

This will generate a template Haskell project with a flake.nix. If you already have a Haskell project, copy over this flake.nix and adjust accordingly.

Template

If you are bootstrapping a new Haskell project, you may use https://github.com/srid/haskell-template which already uses haskell-flake along with other opinionated defaults.

Documentation

Check out the list of options. haskell-flake uses callCabal2nix and shellFor under the hood.

Examples