<div dir="ltr">Dear list,<br><div><div><br></div><div>garn is a new take on Nix - configured in Typescript rather than the Nix</div>language, and with a nicer and simpler CLI (thanks optparse-applicative!).<br>The repository is <a href="https://github.com/garnix-io/garn">https://github.com/garnix-io/garn</a>, and the website is<br><a href="https://garn.io/">https://garn.io/</a>.<br><br>I'm mentioning it here because we just added better Haskell support, which<br>makes it now a plausible alternative to managing your Haskell projects with<br>Nix, Stack or Cabal. An example Haskell project:<br><br>  import * as garn from "<a href="https://garn.io/ts/v0.0.18/mod.ts">https://garn.io/ts/v0.0.18/mod.ts</a>";<br>  import * as pkgs from "<a href="https://garn.io/ts/v0.0.18/nixpkgs.ts">https://garn.io/ts/v0.0.18/nixpkgs.ts</a>";<br><br>  export const project = garn.haskell.mkHaskellProject({<br>    description: "My project",<br>    src: ".",<br>    executables: ["server", "openapi-generation"]<br>    overrideDependencies: {<br>      "servant": "0.19.1"<br>    },<br>    ghcVersion: "ghc94"<br>  }).addExecutable("format")`${pkgs.ormolu}/bin/ormolu --mode inplace $(find . -name '*.hs')`<br><br>Which allows for `garn build project` to build the project, and `garn enter<br>project` to be in a devshell with cabal, ghc94 and all the dependencies<br>installed, and `garn run project.format` for formatting all files with ormolu.<br><br>(`garn init` is capable of generating most of that file for you.)<br><br># Comparisons<br><br>First, compared to all of the options below, garn is much less mature - there'll<br>be rougher edges or features not yet supported. It's also still changing very quickly,<br>and backwards compatibility is not, for now, a priority.<br><br>- Cabal: Like Cabal, garn still uses a cabal file, and in fact expects you to<br>  develop with cabal. garn brings in the dependencies itself and makes them<br>  known to ghc/cabal, and they're snapshot-based rather than resolver-based. In<br>  addition, garn makes it easy to include system (non-Haskell) dependencies, it<br>  sandboxes builds and tests for better reproduciblity (making CI in particular<br>  quite easy); it allows for shared caches; it supports scripts for project<br>  janitoring and management; and it supports devshells.<br><br>- Stack: Like Stack, garn uses a snapshot-based approach to dependencies. In<br>  fact, it's based on the stackage releases. It also supports overriding<br>  versions from Hackage, but not yet from git. Unlike Stack, it allows<br>  specifying system dependencies (non-Haskell dependencies); it sandboxes<br>  builds and tests for better reproduciblity (making CI in particular quite<br>  easy); it allows for shared caches; it supports scripts for project<br>  janitoring and management; and it supports devshells.<br><br>- Nix: the focus of garn has been a simplified and more productive user<br>  experience when compared to Nix. A typed language means you can get<br>  autocompletion, documentation, and type errors in your editor, for example.<br>  And, even if Typescript is by no means perfect, it's much easier to program<br>  in than Nix, so it becomes more fun to abstract away functionality (e.g.: an<br>  addGhcidToProject function). garn "transpiles" to Nix, and Nix can be<br>  embedded in garn, so the choice is not binary. <br><br># Feedback<br><br>If you try it out, please let us know what you think, or if you run into any<br>roadblocks. You can email me at this address, or open issues on GitHub, or join<br>the Discord channel at <a href="https://discord.com/invite/XtDrPsqpVx">https://discord.com/invite/XtDrPsqpVx</a>.<br><br>It also happens to be partly written in Haskell; hopefully that makes it more<br>easy and fun to get involved!<br><br>Cheers,<br> Julian<br></div></div>