mirror of
https://github.com/srid/haskell-flake.git
synced 2024-09-11 05:55:25 +03:00
A
flake-parts
Nix module for Haskell development
.github/workflows | ||
example | ||
test | ||
.gitignore | ||
CHANGELOG.md | ||
docs.sh | ||
flake-module.nix | ||
flake.nix | ||
haskell-project.nix | ||
LICENSE | ||
README.md | ||
runtest.sh |
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 existing Haskell projects, run:
nix flake init -t github:srid/haskell-flake
To create a new Haskell project, run:
nix flake init -t github:srid/haskell-flake#example
Template
You may also 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:
Recommendations
- Use
treefmt-nix
for providing linting features like auto-formatting and hlint checks. See haskell-template for example.