Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Correct me if I'm wrong, but you'd still have to compile it from source on nix, no?

On my relatively powerful workstation, Erlang/BEAM takes about 7 minutes to compile.

We're working around this currently by having a fat devcontainer image, pre-built with Erlang inside (from source) by our CI. It chews through CI minutes unavoidably due to how docker layer caching works.

It would be awesome to just download and unpack a tarball, regardless of which distro you're using.





Nix is centered around the local Nix store and binary caching.

As long as the specific version of Erlang you’re using is present in either your Nix store or the global cache for your OS and arch (at cache.nixos.org), you should not need to compile anything.

And if you rely on custom builds, you can just setup your own binary cache. This is similar to remote caching in Bazel.

Some more details on Nix caching here: https://zero-to-nix.com/concepts/caching/


We do exactly this at my dayjob - we have (multiple) very specific combinations of (erlang, elixir, hex, rebar3) that we use which are pinned to exactly the versions we need. We have a private Nix cache so we only have to build them once.

https://www.cachix.org/ simplifies running a custom cache. Well worth the money, IMO.

That said, learning nix and setting up a nix cache is still a lot of work. Docker buildx might offer you some more knobs to cache portions of your build in a finer-grained manner without having to take the nix plunge.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: