Haskell: Difference between revisions
m link and introduction sentence added |
→Using haskell-flake (flake-parts): Update links and include instructions on getting started |
||
Line 210: | Line 210: | ||
=== Using haskell-flake (flake-parts) === | === Using haskell-flake (flake-parts) === | ||
[https://flake.parts | [https://community.flake.parts/haskell-flake haskell-flake] aims to simplify writing Nix for Haskell development through use of [https://flake.parts/index.html flake-parts module system]. It uses <code>callCabal2nix</code> and <code>shellFor</code> under the hood while exposing friendly module options API. | ||
* For existing Haskell projects, initialize with: | |||
<syntaxhighlight lang="bash"> | |||
nix flake init -t github:srid/haskell-flake | |||
</syntaxhighlight> | |||
* For new Haskell projects, use the example template: | |||
<syntaxhighlight lang="bash"> | |||
mkdir example && cd ./example | |||
nix flake init -t github:srid/haskell-flake#example | |||
</syntaxhighlight> | |||
After configuration, projects can be built with <code>nix build</code> and executed with <code>nix run</code>. For more information, see the [https://community.flake.parts/haskell-flake/start getting started] page. | |||
A full list of configuration options can be found in the [https://flake.parts/options/haskell-flake haskell-flake options reference] | |||
== Overrides == | == Overrides == |