beamPackages: Deduplicate default package set
Previously there were two package sets for the default Erlang version, beam.packages.erlang and beam.packages.erlangR24, which didn't share their evaluation. This commit fixes this by pointing the former to the latter. It also introduces a `beam.defaultVersion` attribute which can be used to get or set the default version to something other than `erlangR24`.
This commit is contained in:
parent
914705b895
commit
2508d1e2a5
1 changed files with 9 additions and 6 deletions
|
@ -3,14 +3,17 @@
|
|||
with beam; {
|
||||
lib = callPackage ../development/beam-modules/lib.nix { };
|
||||
|
||||
# R24 is the default version.
|
||||
# The main switch to change default Erlang version.
|
||||
defaultVersion = "erlangR24";
|
||||
|
||||
# Each
|
||||
interpreters = with beam.interpreters; {
|
||||
|
||||
# R24 is the default version.
|
||||
erlang = erlangR24; # The main switch to change default Erlang version.
|
||||
erlang_odbc = erlangR24_odbc;
|
||||
erlang_javac = erlangR24_javac;
|
||||
erlang_odbc_javac = erlangR24_odbc_javac;
|
||||
erlang = beam.interpreters.${defaultVersion};
|
||||
erlang_odbc = beam.interpreters."${defaultVersion}_odbc";
|
||||
erlang_javac = beam.interpreters."${defaultVersion}_javac";
|
||||
erlang_odbc_javac = beam.interpreters."${defaultVersion}_odbc_javac";
|
||||
|
||||
# Standard Erlang versions, using the generic builder.
|
||||
|
||||
|
@ -98,7 +101,7 @@ with beam; {
|
|||
# appropriate Erlang/OTP version.
|
||||
packages = {
|
||||
# Packages built with default Erlang version.
|
||||
erlang = packagesWith interpreters.erlang;
|
||||
erlang = packages.${defaultVersion};
|
||||
|
||||
erlangR24 = packagesWith interpreters.erlangR24;
|
||||
erlangR23 = packagesWith interpreters.erlangR23;
|
||||
|
|
Loading…
Reference in a new issue