mirror of
https://github.com/srid/haskell-flake.git
synced 2024-09-11 14:05:58 +03:00
A
flake-parts
Nix module for Haskell development
.github/workflows | ||
example | ||
.gitignore | ||
flake-module.nix | ||
flake.nix | ||
LICENSE | ||
README.md |
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
- Simple
- Complex: