The Erlang and Elixir packaging both do this to offer access to multiple releases of each language’s tooling. It’s also something of an mildly interesting example, given that there’s a matrix of compatibility between Erlang VM and Elixir releases and you might want to vary one or both in our own projects. Here’s a poorly-ordered list of files to poke through for inspiration, and apologies if you were already aware of them or similar patterns:
- all-packages.nix (VERY SLOW TO LOAD)
- beam-packages.nix
- erlang/generic-builder.nix
- erlang/R24.nix
- elixir/generic-builder.nix
- elixir/1.12.nix
TL;DR - you can then reference these via attributes such as beam.packages.erlangR23.elixir_1_10
.