9 , systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd
15 # Aliases added 2023-03-21
16 versionLoop = f: lib.lists.foldr (version: acc: (f version) // acc) { } [ "26" "25" "24" "23" ];
18 interpretersAliases = versionLoop (version: {
19 "erlangR${version}" = self.interpreters."erlang_${version}";
20 "erlangR${version}_odbc" = self.interpreters."erlang_${version}_odbc";
21 "erlangR${version}_javac" = self.interpreters."erlang_${version}_javac";
22 "erlangR${version}_odbc_javac" = self.interpreters."erlang_${version}_odbc_javac";
25 packagesAliases = versionLoop (version: { "erlangR${version}" = self.packages."erlang_${version}"; });
30 beamLib = callPackage ../development/beam-modules/lib.nix { };
32 latestVersion = "erlang_25";
37 erlang = self.interpreters.${self.latestVersion};
38 erlang_odbc = self.interpreters."${self.latestVersion}_odbc";
39 erlang_javac = self.interpreters."${self.latestVersion}_javac";
40 erlang_odbc_javac = self.interpreters."${self.latestVersion}_odbc_javac";
42 # Standard Erlang versions, using the generic builder.
44 erlang_26 = self.beamLib.callErlang ../development/interpreters/erlang/26.nix {
47 autoconf = buildPackages.autoconf269;
48 inherit wxSupport systemdSupport;
50 erlang_26_odbc = self.interpreters.erlang_26.override { odbcSupport = true; };
51 erlang_26_javac = self.interpreters.erlang_26.override { javacSupport = true; };
52 erlang_26_odbc_javac = self.interpreters.erlang_26.override {
57 erlang_25 = self.beamLib.callErlang ../development/interpreters/erlang/25.nix {
60 autoconf = buildPackages.autoconf269;
61 inherit wxSupport systemdSupport;
63 erlang_25_odbc = self.interpreters.erlang_25.override { odbcSupport = true; };
64 erlang_25_javac = self.interpreters.erlang_25.override { javacSupport = true; };
65 erlang_25_odbc_javac = self.interpreters.erlang_25.override {
70 erlang_24 = self.beamLib.callErlang ../development/interpreters/erlang/24.nix {
72 # Can be enabled since the bug has been fixed in https://github.com/erlang/otp/pull/2508
74 autoconf = buildPackages.autoconf269;
75 inherit wxSupport systemdSupport;
77 erlang_24_odbc = self.interpreters.erlang_24.override { odbcSupport = true; };
78 erlang_24_javac = self.interpreters.erlang_24.override { javacSupport = true; };
79 erlang_24_odbc_javac = self.interpreters.erlang_24.override {
84 # Other Beam languages. These are built with `beam.interpreters.erlang`. To
85 # access for example elixir built with different version of Erlang, use
86 # `beam.packages.erlang_24.elixir`.
87 inherit (self.packages.erlang)
88 elixir elixir_1_15 elixir_1_14 elixir_1_13 elixir_1_12 elixir_1_11 elixir_1_10 elixir-ls lfe lfe_2_1;
89 } // interpretersAliases;
91 # Helper function to generate package set with a specific Erlang version.
92 packagesWith = erlang:
93 callPackage ../development/beam-modules { inherit erlang; };
95 # Each field in this tuple represents all Beam packages in nixpkgs built with
96 # appropriate Erlang/OTP version.
98 erlang = self.packages.${self.latestVersion};
100 erlang_26 = self.packagesWith self.interpreters.erlang_26;
101 erlang_25 = self.packagesWith self.interpreters.erlang_25;
102 erlang_24 = self.packagesWith self.interpreters.erlang_24;
103 } // packagesAliases;