2021-09-11 15:50:52 +03:00
|
|
|
{ beam, callPackage, wxGTK30, buildPackages, stdenv
|
|
|
|
, wxSupport ? true
|
|
|
|
, systemdSupport ? stdenv.isLinux
|
|
|
|
}:
|
2017-06-03 23:20:20 +03:00
|
|
|
|
2021-08-23 16:59:10 +03:00
|
|
|
with beam; {
|
2021-01-20 13:06:01 +03:00
|
|
|
lib = callPackage ../development/beam-modules/lib.nix { };
|
2017-06-03 23:20:20 +03:00
|
|
|
|
2021-08-23 17:06:41 +03:00
|
|
|
# R24 is the default version.
|
|
|
|
# The main switch to change default Erlang version.
|
|
|
|
defaultVersion = "erlangR24";
|
|
|
|
|
2017-06-17 17:28:41 +03:00
|
|
|
# Each
|
2021-08-23 16:59:10 +03:00
|
|
|
interpreters = with beam.interpreters; {
|
2017-06-03 23:20:20 +03:00
|
|
|
|
2021-08-23 17:06:41 +03:00
|
|
|
erlang = beam.interpreters.${defaultVersion};
|
|
|
|
erlang_odbc = beam.interpreters."${defaultVersion}_odbc";
|
|
|
|
erlang_javac = beam.interpreters."${defaultVersion}_javac";
|
|
|
|
erlang_odbc_javac = beam.interpreters."${defaultVersion}_odbc_javac";
|
2017-06-03 23:20:20 +03:00
|
|
|
|
2020-06-10 21:02:50 +03:00
|
|
|
# Standard Erlang versions, using the generic builder.
|
|
|
|
|
2021-05-12 16:27:31 +03:00
|
|
|
# R24
|
|
|
|
erlangR24 = lib.callErlang ../development/interpreters/erlang/R24.nix {
|
|
|
|
wxGTK = wxGTK30;
|
|
|
|
# Can be enabled since the bug has been fixed in https://github.com/erlang/otp/pull/2508
|
|
|
|
parallelBuild = true;
|
|
|
|
autoconf = buildPackages.autoconf269;
|
2021-09-11 15:50:52 +03:00
|
|
|
inherit wxSupport systemdSupport;
|
2021-05-12 16:27:31 +03:00
|
|
|
};
|
|
|
|
erlangR24_odbc = erlangR24.override { odbcSupport = true; };
|
|
|
|
erlangR24_javac = erlangR24.override { javacSupport = true; };
|
|
|
|
erlangR24_odbc_javac = erlangR24.override {
|
|
|
|
javacSupport = true;
|
|
|
|
odbcSupport = true;
|
|
|
|
};
|
|
|
|
|
2020-06-10 21:02:50 +03:00
|
|
|
# R23
|
|
|
|
erlangR23 = lib.callErlang ../development/interpreters/erlang/R23.nix {
|
2017-06-03 23:20:20 +03:00
|
|
|
wxGTK = wxGTK30;
|
2020-06-10 21:02:50 +03:00
|
|
|
# Can be enabled since the bug has been fixed in https://github.com/erlang/otp/pull/2508
|
|
|
|
parallelBuild = true;
|
2021-01-01 12:48:32 +03:00
|
|
|
autoconf = buildPackages.autoconf269;
|
2021-09-11 15:50:52 +03:00
|
|
|
inherit wxSupport systemdSupport;
|
2017-06-03 23:20:20 +03:00
|
|
|
};
|
2020-06-10 21:02:50 +03:00
|
|
|
erlangR23_odbc = erlangR23.override { odbcSupport = true; };
|
|
|
|
erlangR23_javac = erlangR23.override { javacSupport = true; };
|
|
|
|
erlangR23_odbc_javac = erlangR23.override {
|
2021-01-20 13:06:01 +03:00
|
|
|
javacSupport = true;
|
|
|
|
odbcSupport = true;
|
2017-06-03 23:20:20 +03:00
|
|
|
};
|
2020-06-10 21:02:50 +03:00
|
|
|
|
|
|
|
# R22
|
|
|
|
erlangR22 = lib.callErlang ../development/interpreters/erlang/R22.nix {
|
2017-06-03 23:20:20 +03:00
|
|
|
wxGTK = wxGTK30;
|
2020-06-10 21:02:50 +03:00
|
|
|
# Can be enabled since the bug has been fixed in https://github.com/erlang/otp/pull/2508
|
|
|
|
parallelBuild = true;
|
2021-01-01 12:48:32 +03:00
|
|
|
autoconf = buildPackages.autoconf269;
|
2021-09-11 15:50:52 +03:00
|
|
|
inherit wxSupport systemdSupport;
|
2017-06-03 23:20:20 +03:00
|
|
|
};
|
2020-06-10 21:02:50 +03:00
|
|
|
erlangR22_odbc = erlangR22.override { odbcSupport = true; };
|
|
|
|
erlangR22_javac = erlangR22.override { javacSupport = true; };
|
|
|
|
erlangR22_odbc_javac = erlangR22.override {
|
2021-01-20 13:06:01 +03:00
|
|
|
javacSupport = true;
|
|
|
|
odbcSupport = true;
|
2017-06-03 23:20:20 +03:00
|
|
|
};
|
2020-06-10 21:02:50 +03:00
|
|
|
|
|
|
|
# R21
|
|
|
|
erlangR21 = lib.callErlang ../development/interpreters/erlang/R21.nix {
|
|
|
|
wxGTK = wxGTK30;
|
2021-01-01 12:48:32 +03:00
|
|
|
autoconf = buildPackages.autoconf269;
|
2021-09-11 15:50:52 +03:00
|
|
|
inherit wxSupport systemdSupport;
|
2020-06-10 21:02:50 +03:00
|
|
|
};
|
|
|
|
erlangR21_odbc = erlangR21.override { odbcSupport = true; };
|
|
|
|
erlangR21_javac = erlangR21.override { javacSupport = true; };
|
|
|
|
erlangR21_odbc_javac = erlangR21.override {
|
2021-01-20 13:06:01 +03:00
|
|
|
javacSupport = true;
|
|
|
|
odbcSupport = true;
|
2020-06-10 21:02:50 +03:00
|
|
|
};
|
|
|
|
|
2017-12-08 16:19:49 +03:00
|
|
|
# Basho fork, using custom builder.
|
2021-01-20 13:06:01 +03:00
|
|
|
erlang_basho_R16B02 =
|
|
|
|
lib.callErlang ../development/interpreters/erlang/R16B02-basho.nix {
|
|
|
|
autoconf = buildPackages.autoconf269;
|
2020-12-22 14:22:05 +03:00
|
|
|
inherit wxSupport;
|
2021-01-20 13:06:01 +03:00
|
|
|
};
|
|
|
|
erlang_basho_R16B02_odbc =
|
|
|
|
erlang_basho_R16B02.override { odbcSupport = true; };
|
2017-06-03 23:20:20 +03:00
|
|
|
|
2017-06-18 20:24:18 +03:00
|
|
|
# Other Beam languages. These are built with `beam.interpreters.erlang`. To
|
|
|
|
# access for example elixir built with different version of Erlang, use
|
2021-12-06 19:07:01 +03:00
|
|
|
# `beam.packages.erlangR24.elixir`.
|
2021-01-20 13:06:01 +03:00
|
|
|
inherit (packages.erlang)
|
2021-12-06 19:07:01 +03:00
|
|
|
elixir elixir_1_13 elixir_1_12 elixir_1_11 elixir_1_10 elixir_1_9 elixir_ls;
|
2017-06-23 03:34:32 +03:00
|
|
|
|
2021-05-17 11:09:51 +03:00
|
|
|
inherit (packages.erlang) lfe lfe_1_3;
|
2017-06-03 23:20:20 +03:00
|
|
|
};
|
|
|
|
|
2017-06-17 17:28:41 +03:00
|
|
|
# Helper function to generate package set with a specific Erlang version.
|
2021-01-20 13:06:01 +03:00
|
|
|
packagesWith = erlang:
|
|
|
|
callPackage ../development/beam-modules { inherit erlang; };
|
2017-06-17 17:28:41 +03:00
|
|
|
|
|
|
|
# Each field in this tuple represents all Beam packages in nixpkgs built with
|
|
|
|
# appropriate Erlang/OTP version.
|
2019-08-14 00:52:01 +03:00
|
|
|
packages = {
|
2017-06-17 17:28:41 +03:00
|
|
|
# Packages built with default Erlang version.
|
2021-08-23 17:06:41 +03:00
|
|
|
erlang = packages.${defaultVersion};
|
2020-06-10 21:02:50 +03:00
|
|
|
|
2021-05-15 21:14:03 +03:00
|
|
|
erlangR24 = packagesWith interpreters.erlangR24;
|
2020-06-10 21:02:50 +03:00
|
|
|
erlangR23 = packagesWith interpreters.erlangR23;
|
2019-06-18 11:56:32 +03:00
|
|
|
erlangR22 = packagesWith interpreters.erlangR22;
|
2020-06-10 21:02:50 +03:00
|
|
|
erlangR21 = packagesWith interpreters.erlangR21;
|
2017-06-03 23:20:20 +03:00
|
|
|
};
|
|
|
|
}
|