Announcing dwayne/elm2nix

Hello everyone,

I am very excited to announce my rewrite of cachix/elm2nix. I have written an announcement post on my blog that goes into all the details. If you’re interested in Elm, Haskell, or Nix then there’s probably something in this project that might interest you.

5 Likes

I love this! Great work! :slight_smile:

I’ve been using a basic flake but I still use elm-tooling for setting my elm dev dependencies. I wonder if by using this I would be able to centralize more things and depend less on node/npm.

1 Like

Thanks, I appreciate it.

Even without elm2nix you could have already centralized more things and depended less on node/npm. I was using Devbox a lot in my personal Elm projects up till now so I don’t have a Nix flake at the ready that I’ve used in a recent project.

With that in mind, here’s how to do it using Devbox.

This article, How I use Nix in my Elm projects, shows how I used to do it with shell.nix and flake.nix.

And this article, GitHub Actions, Devbox, and Elm, shows some of the benefits you get in CI when using Devbox.

The major benefits that elm2nix would provide over what I’ve shared above is:

  1. A way to build your Elm web application in a Nix build environment so that you can gain all the benefits of Nix. This opens up a world of possibilities that I really can’t begin to describe right now but which I will elaborate on in the near future.
  2. A way to take advantage of the Elm cache in CI so that you don’t experience the problems that people have been recently experiencing in their CI environments.
4 Likes