2022-09-10 00:26:34 +02:00
|
|
|
{ beam
|
|
|
|
, callPackage
|
2022-06-15 19:10:57 +02:00
|
|
|
, openssl_1_1
|
2022-09-10 00:26:34 +02:00
|
|
|
, wxGTK30
|
|
|
|
, buildPackages
|
|
|
|
, stdenv
|
2021-09-11 14:50:52 +02:00
|
|
|
, wxSupport ? true
|
|
|
|
, systemdSupport ? stdenv.isLinux
|
|
|
|
}:
|
2017-06-03 22:20:20 +02:00
|
|
|
|
2022-09-10 00:26:34 +02:00
|
|
|
let
|
|
|
|
self = beam;
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
beamLib = callPackage ../development/beam-modules/lib.nix { };
|
2017-06-03 22:20:20 +02:00
|
|
|
|
2021-08-23 16:06:41 +02:00
|
|
|
# R24 is the default version.
|
|
|
|
# The main switch to change default Erlang version.
|
|
|
|
defaultVersion = "erlangR24";
|
|
|
|
|
2017-06-17 16:28:41 +02:00
|
|
|
# Each
|
2022-09-10 00:26:34 +02:00
|
|
|
interpreters = {
|
2017-06-03 22:20:20 +02:00
|
|
|
|
2022-09-10 00:26:34 +02:00
|
|
|
erlang = self.interpreters.${self.defaultVersion};
|
|
|
|
erlang_odbc = self.interpreters."${self.defaultVersion}_odbc";
|
|
|
|
erlang_javac = self.interpreters."${self.defaultVersion}_javac";
|
|
|
|
erlang_odbc_javac = self.interpreters."${self.defaultVersion}_odbc_javac";
|
2017-06-03 22:20:20 +02:00
|
|
|
|
2020-06-10 20:02:50 +02:00
|
|
|
# Standard Erlang versions, using the generic builder.
|
|
|
|
|
2022-05-20 12:17:16 +02:00
|
|
|
# R25
|
2022-09-10 00:26:34 +02:00
|
|
|
erlangR25 = self.beamLib.callErlang ../development/interpreters/erlang/R25.nix {
|
2022-05-20 12:17:16 +02:00
|
|
|
wxGTK = wxGTK30;
|
|
|
|
parallelBuild = true;
|
|
|
|
autoconf = buildPackages.autoconf269;
|
|
|
|
inherit wxSupport systemdSupport;
|
|
|
|
};
|
2022-09-10 00:26:34 +02:00
|
|
|
erlangR25_odbc = self.interpreters.erlangR25.override { odbcSupport = true; };
|
|
|
|
erlangR25_javac = self.interpreters.erlangR25.override { javacSupport = true; };
|
|
|
|
erlangR25_odbc_javac = self.interpreters.erlangR25.override {
|
2022-05-20 12:17:16 +02:00
|
|
|
javacSupport = true;
|
|
|
|
odbcSupport = true;
|
|
|
|
};
|
|
|
|
|
2021-05-12 15:27:31 +02:00
|
|
|
# R24
|
2022-09-10 00:26:34 +02:00
|
|
|
erlangR24 = self.beamLib.callErlang ../development/interpreters/erlang/R24.nix {
|
2021-05-12 15:27:31 +02:00
|
|
|
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 14:50:52 +02:00
|
|
|
inherit wxSupport systemdSupport;
|
2021-05-12 15:27:31 +02:00
|
|
|
};
|
2022-09-10 00:26:34 +02:00
|
|
|
erlangR24_odbc = self.interpreters.erlangR24.override { odbcSupport = true; };
|
|
|
|
erlangR24_javac = self.interpreters.erlangR24.override { javacSupport = true; };
|
|
|
|
erlangR24_odbc_javac = self.interpreters.erlangR24.override {
|
2021-05-12 15:27:31 +02:00
|
|
|
javacSupport = true;
|
|
|
|
odbcSupport = true;
|
|
|
|
};
|
|
|
|
|
2020-06-10 20:02:50 +02:00
|
|
|
# R23
|
2022-09-10 00:26:34 +02:00
|
|
|
erlangR23 = self.beamLib.callErlang ../development/interpreters/erlang/R23.nix {
|
2022-06-15 19:10:57 +02:00
|
|
|
openssl = openssl_1_1;
|
2017-06-03 22:20:20 +02:00
|
|
|
wxGTK = wxGTK30;
|
2020-06-10 20:02:50 +02:00
|
|
|
# Can be enabled since the bug has been fixed in https://github.com/erlang/otp/pull/2508
|
|
|
|
parallelBuild = true;
|
2021-01-01 10:48:32 +01:00
|
|
|
autoconf = buildPackages.autoconf269;
|
2021-09-11 14:50:52 +02:00
|
|
|
inherit wxSupport systemdSupport;
|
2017-06-03 22:20:20 +02:00
|
|
|
};
|
2022-09-10 00:26:34 +02:00
|
|
|
erlangR23_odbc = self.interpreters.erlangR23.override { odbcSupport = true; };
|
|
|
|
erlangR23_javac = self.interpreters.erlangR23.override { javacSupport = true; };
|
|
|
|
erlangR23_odbc_javac = self.interpreters.erlangR23.override {
|
2021-01-20 11:06:01 +01:00
|
|
|
javacSupport = true;
|
|
|
|
odbcSupport = true;
|
2017-06-03 22:20:20 +02:00
|
|
|
};
|
2020-06-10 20:02:50 +02:00
|
|
|
|
|
|
|
# R22
|
2022-09-10 00:26:34 +02:00
|
|
|
erlangR22 = self.beamLib.callErlang ../development/interpreters/erlang/R22.nix {
|
2022-06-15 19:10:57 +02:00
|
|
|
openssl = openssl_1_1;
|
2017-06-03 22:20:20 +02:00
|
|
|
wxGTK = wxGTK30;
|
2020-06-10 20:02:50 +02:00
|
|
|
# Can be enabled since the bug has been fixed in https://github.com/erlang/otp/pull/2508
|
|
|
|
parallelBuild = true;
|
2021-01-01 10:48:32 +01:00
|
|
|
autoconf = buildPackages.autoconf269;
|
2021-09-11 14:50:52 +02:00
|
|
|
inherit wxSupport systemdSupport;
|
2017-06-03 22:20:20 +02:00
|
|
|
};
|
2022-09-10 00:26:34 +02:00
|
|
|
erlangR22_odbc = self.interpreters.erlangR22.override { odbcSupport = true; };
|
|
|
|
erlangR22_javac = self.interpreters.erlangR22.override { javacSupport = true; };
|
|
|
|
erlangR22_odbc_javac = self.interpreters.erlangR22.override {
|
2021-01-20 11:06:01 +01:00
|
|
|
javacSupport = true;
|
|
|
|
odbcSupport = true;
|
2017-06-03 22:20:20 +02:00
|
|
|
};
|
2020-06-10 20:02:50 +02:00
|
|
|
|
|
|
|
# R21
|
2022-09-10 00:26:34 +02:00
|
|
|
erlangR21 = self.beamLib.callErlang ../development/interpreters/erlang/R21.nix {
|
2022-06-15 19:10:57 +02:00
|
|
|
openssl = openssl_1_1;
|
2020-06-10 20:02:50 +02:00
|
|
|
wxGTK = wxGTK30;
|
2021-01-01 10:48:32 +01:00
|
|
|
autoconf = buildPackages.autoconf269;
|
2021-09-11 14:50:52 +02:00
|
|
|
inherit wxSupport systemdSupport;
|
2020-06-10 20:02:50 +02:00
|
|
|
};
|
2022-09-10 00:26:34 +02:00
|
|
|
erlangR21_odbc = self.interpreters.erlangR21.override { odbcSupport = true; };
|
|
|
|
erlangR21_javac = self.interpreters.erlangR21.override { javacSupport = true; };
|
|
|
|
erlangR21_odbc_javac = self.interpreters.erlangR21.override {
|
2021-01-20 11:06:01 +01:00
|
|
|
javacSupport = true;
|
|
|
|
odbcSupport = true;
|
2020-06-10 20:02:50 +02:00
|
|
|
};
|
2017-06-03 22:20:20 +02:00
|
|
|
|
2017-06-18 19:24:18 +02: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 17:07:01 +01:00
|
|
|
# `beam.packages.erlangR24.elixir`.
|
2022-09-10 00:26:34 +02:00
|
|
|
inherit (self.packages.erlang)
|
2022-09-01 23:54:49 +02:00
|
|
|
elixir elixir_1_14 elixir_1_13 elixir_1_12 elixir_1_11 elixir_1_10 elixir_ls;
|
2017-06-23 02:34:32 +02:00
|
|
|
|
2022-09-10 00:26:34 +02:00
|
|
|
inherit (self.packages.erlang) lfe lfe_1_3;
|
2017-06-03 22:20:20 +02:00
|
|
|
};
|
|
|
|
|
2017-06-17 16:28:41 +02:00
|
|
|
# Helper function to generate package set with a specific Erlang version.
|
2021-01-20 11:06:01 +01:00
|
|
|
packagesWith = erlang:
|
|
|
|
callPackage ../development/beam-modules { inherit erlang; };
|
2017-06-17 16:28:41 +02:00
|
|
|
|
|
|
|
# Each field in this tuple represents all Beam packages in nixpkgs built with
|
|
|
|
# appropriate Erlang/OTP version.
|
2019-08-13 23:52:01 +02:00
|
|
|
packages = {
|
2017-06-17 16:28:41 +02:00
|
|
|
# Packages built with default Erlang version.
|
2022-09-10 00:26:34 +02:00
|
|
|
erlang = self.packages.${self.defaultVersion};
|
2020-06-10 20:02:50 +02:00
|
|
|
|
2022-09-10 00:26:34 +02:00
|
|
|
erlangR25 = self.packagesWith self.interpreters.erlangR25;
|
|
|
|
erlangR24 = self.packagesWith self.interpreters.erlangR24;
|
|
|
|
erlangR23 = self.packagesWith self.interpreters.erlangR23;
|
|
|
|
erlangR22 = self.packagesWith self.interpreters.erlangR22;
|
|
|
|
erlangR21 = self.packagesWith self.interpreters.erlangR21;
|
2017-06-03 22:20:20 +02:00
|
|
|
};
|
|
|
|
}
|