8 , systemdSupport ? stdenv.isLinux
16 beamLib = callPackage ../development/beam-modules/lib.nix { };
18 # R24 is the default version.
19 # The main switch to change default Erlang version.
20 defaultVersion = "erlangR24";
25 erlang = self.interpreters.${self.defaultVersion};
26 erlang_odbc = self.interpreters."${self.defaultVersion}_odbc";
27 erlang_javac = self.interpreters."${self.defaultVersion}_javac";
28 erlang_odbc_javac = self.interpreters."${self.defaultVersion}_odbc_javac";
30 # Standard Erlang versions, using the generic builder.
33 erlangR25 = self.beamLib.callErlang ../development/interpreters/erlang/R25.nix {
36 autoconf = buildPackages.autoconf269;
37 inherit wxSupport systemdSupport;
39 erlangR25_odbc = self.interpreters.erlangR25.override { odbcSupport = true; };
40 erlangR25_javac = self.interpreters.erlangR25.override { javacSupport = true; };
41 erlangR25_odbc_javac = self.interpreters.erlangR25.override {
47 erlangR24 = self.beamLib.callErlang ../development/interpreters/erlang/R24.nix {
49 # Can be enabled since the bug has been fixed in https://github.com/erlang/otp/pull/2508
51 autoconf = buildPackages.autoconf269;
52 inherit wxSupport systemdSupport;
54 erlangR24_odbc = self.interpreters.erlangR24.override { odbcSupport = true; };
55 erlangR24_javac = self.interpreters.erlangR24.override { javacSupport = true; };
56 erlangR24_odbc_javac = self.interpreters.erlangR24.override {
62 erlangR23 = self.beamLib.callErlang ../development/interpreters/erlang/R23.nix {
63 openssl = openssl_1_1;
65 # Can be enabled since the bug has been fixed in https://github.com/erlang/otp/pull/2508
67 autoconf = buildPackages.autoconf269;
68 inherit wxSupport systemdSupport;
70 erlangR23_odbc = self.interpreters.erlangR23.override { odbcSupport = true; };
71 erlangR23_javac = self.interpreters.erlangR23.override { javacSupport = true; };
72 erlangR23_odbc_javac = self.interpreters.erlangR23.override {
78 erlangR22 = self.beamLib.callErlang ../development/interpreters/erlang/R22.nix {
79 openssl = openssl_1_1;
81 # Can be enabled since the bug has been fixed in https://github.com/erlang/otp/pull/2508
83 autoconf = buildPackages.autoconf269;
84 inherit wxSupport systemdSupport;
86 erlangR22_odbc = self.interpreters.erlangR22.override { odbcSupport = true; };
87 erlangR22_javac = self.interpreters.erlangR22.override { javacSupport = true; };
88 erlangR22_odbc_javac = self.interpreters.erlangR22.override {
94 erlangR21 = self.beamLib.callErlang ../development/interpreters/erlang/R21.nix {
95 openssl = openssl_1_1;
97 autoconf = buildPackages.autoconf269;
98 inherit wxSupport systemdSupport;
100 erlangR21_odbc = self.interpreters.erlangR21.override { odbcSupport = true; };
101 erlangR21_javac = self.interpreters.erlangR21.override { javacSupport = true; };
102 erlangR21_odbc_javac = self.interpreters.erlangR21.override {
107 # Other Beam languages. These are built with `beam.interpreters.erlang`. To
108 # access for example elixir built with different version of Erlang, use
109 # `beam.packages.erlangR24.elixir`.
110 inherit (self.packages.erlang)
111 elixir elixir_1_14 elixir_1_13 elixir_1_12 elixir_1_11 elixir_1_10 elixir_ls;
113 inherit (self.packages.erlang) lfe lfe_1_3;
116 # Helper function to generate package set with a specific Erlang version.
117 packagesWith = erlang:
118 callPackage ../development/beam-modules { inherit erlang; };
120 # Each field in this tuple represents all Beam packages in nixpkgs built with
121 # appropriate Erlang/OTP version.
123 # Packages built with default Erlang version.
124 erlang = self.packages.${self.defaultVersion};
126 erlangR25 = self.packagesWith self.interpreters.erlangR25;
127 erlangR24 = self.packagesWith self.interpreters.erlangR24;
128 erlangR23 = self.packagesWith self.interpreters.erlangR23;
129 erlangR22 = self.packagesWith self.interpreters.erlangR22;
130 erlangR21 = self.packagesWith self.interpreters.erlangR21;