Elm2nix 0.1 release

Hi all,

I’ve written some words about elm2nix 0.1 release at elm2nix 0.1 – Hercules CI blog

Hope you find that useful for your Elm projects,

Domen

4 Likes

Very cool, thank you for this work! Much better than the shell scripts I’d cobbled together. :slight_smile:

I’m curious about the output of default.nix. In the (admittedly very small number of) projects I’ve worked on, there’s just one Main.elm file that I want to compile, and I want it to produce either index.html or a .js file – not Main.html.

Seems like maybe you’re trying to satisfy both app and package use cases here? I’m not sure there’s a reason to build a package with nix, seems like those all have to flow through package.elm-lang.org and get built as part of some application, no?

Also, have you considered embedding something like the optimize.sh script from the guide?

That’s great feedback :slight_smile:

I wanted to support compiling more than one target, it’s not common but I had an use case of compiling two Main modules. But now I see you can only output one file, so it would make sense to make output filename configurable.

As for optimizations, happy to improve that part if you submit a PR - I’m using Parcel as plain elm asset manager is too simple. But I think we should have out-of-the-box support for it with all the knobs.