Hello everyone,
before I switched to NixOS I used asdf-vm to manage my Elixir and Erlang versions. After switching I learned that asdf-vm doesn’t really work on NixOS, but that flakes could practically do what I’m used to.
In my Elixir projects I need to fullfil three requirements:
I need a specific Elixir version (1.15.4)
I need a specific Erlang version (26.0.2)
Elixir needs to be compiled with this Erlang version.
After some googling I found a flake setup that includes Elixir and Erlang, but there’s no mention about specific versions. How would I go about doing this?
The patch version are probably not as exact as you want it, Though using OTP major with Elixir minor is usally enough of pinning.
And with nix and a pinned nixpkgs input you can have much better guarantees about the environment than with asdf.
If you really want to have exact versions, you can probably use usual overrides to set the src and version attributes accordingly, though I have not played with that, as I do not consider it worth the hazzle.