2023-02-02 18:25:31 +00:00
|
|
|
{ lib
|
|
|
|
, beam
|
2022-09-11 15:47:08 +00:00
|
|
|
, callPackage
|
2022-09-14 18:05:37 +00:00
|
|
|
, openssl_1_1
|
2022-11-27 09:42:12 +00:00
|
|
|
, wxGTK32
|
2022-09-11 15:47:08 +00:00
|
|
|
, buildPackages
|
|
|
|
, stdenv
|
2021-09-18 10:52:07 +00:00
|
|
|
, wxSupport ? true
|
2023-02-02 18:25:31 +00:00
|
|
|
, systemd
|
|
|
|
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd
|
2021-09-18 10:52:07 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-11 15:47:08 +00:00
|
|
|
let
|
|
|
|
self = beam;
|
2023-03-24 00:07:29 +00:00
|
|
|
|
|
|
|
# Aliases added 2023-03-21
|
2023-05-24 13:37:59 +00:00
|
|
|
versionLoop = f: lib.lists.foldr (version: acc: (f version) // acc) { } [ "26" "25" "24" "23" ];
|
2023-03-24 00:07:29 +00:00
|
|
|
|
|
|
|
interpretersAliases = versionLoop (version: {
|
|
|
|
"erlangR${version}" = self.interpreters."erlang_${version}";
|
|
|
|
"erlangR${version}_odbc" = self.interpreters."erlang_${version}_odbc";
|
|
|
|
"erlangR${version}_javac" = self.interpreters."erlang_${version}_javac";
|
|
|
|
"erlangR${version}_odbc_javac" = self.interpreters."erlang_${version}_odbc_javac";
|
|
|
|
});
|
|
|
|
|
|
|
|
packagesAliases = versionLoop (version: { "erlangR${version}" = self.packages."erlang_${version}"; });
|
|
|
|
|
2022-09-11 15:47:08 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
beamLib = callPackage ../development/beam-modules/lib.nix { };
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
latestVersion = "erlang_25";
|
2021-08-25 08:27:29 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# Each
|
2022-09-11 15:47:08 +00:00
|
|
|
interpreters = {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
erlang = self.interpreters.${self.latestVersion};
|
|
|
|
erlang_odbc = self.interpreters."${self.latestVersion}_odbc";
|
|
|
|
erlang_javac = self.interpreters."${self.latestVersion}_javac";
|
|
|
|
erlang_odbc_javac = self.interpreters."${self.latestVersion}_odbc_javac";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
# Standard Erlang versions, using the generic builder.
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
erlang_26 = self.beamLib.callErlang ../development/interpreters/erlang/26.nix {
|
|
|
|
wxGTK = wxGTK32;
|
|
|
|
parallelBuild = true;
|
|
|
|
autoconf = buildPackages.autoconf269;
|
|
|
|
inherit wxSupport systemdSupport;
|
|
|
|
};
|
|
|
|
erlang_26_odbc = self.interpreters.erlang_26.override { odbcSupport = true; };
|
|
|
|
erlang_26_javac = self.interpreters.erlang_26.override { javacSupport = true; };
|
|
|
|
erlang_26_odbc_javac = self.interpreters.erlang_26.override {
|
|
|
|
javacSupport = true;
|
|
|
|
odbcSupport = true;
|
|
|
|
};
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
erlang_25 = self.beamLib.callErlang ../development/interpreters/erlang/25.nix {
|
2022-11-27 09:42:12 +00:00
|
|
|
wxGTK = wxGTK32;
|
2022-06-16 17:23:12 +00:00
|
|
|
parallelBuild = true;
|
|
|
|
autoconf = buildPackages.autoconf269;
|
|
|
|
inherit wxSupport systemdSupport;
|
|
|
|
};
|
2023-03-24 00:07:29 +00:00
|
|
|
erlang_25_odbc = self.interpreters.erlang_25.override { odbcSupport = true; };
|
|
|
|
erlang_25_javac = self.interpreters.erlang_25.override { javacSupport = true; };
|
|
|
|
erlang_25_odbc_javac = self.interpreters.erlang_25.override {
|
2022-06-16 17:23:12 +00:00
|
|
|
javacSupport = true;
|
|
|
|
odbcSupport = true;
|
|
|
|
};
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
erlang_24 = self.beamLib.callErlang ../development/interpreters/erlang/24.nix {
|
2022-11-27 09:42:12 +00:00
|
|
|
wxGTK = wxGTK32;
|
2021-05-20 23:08:51 +00:00
|
|
|
# Can be enabled since the bug has been fixed in https://github.com/erlang/otp/pull/2508
|
|
|
|
parallelBuild = true;
|
|
|
|
autoconf = buildPackages.autoconf269;
|
2021-09-18 10:52:07 +00:00
|
|
|
inherit wxSupport systemdSupport;
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
2023-03-24 00:07:29 +00:00
|
|
|
erlang_24_odbc = self.interpreters.erlang_24.override { odbcSupport = true; };
|
|
|
|
erlang_24_javac = self.interpreters.erlang_24.override { javacSupport = true; };
|
|
|
|
erlang_24_odbc_javac = self.interpreters.erlang_24.override {
|
2021-05-20 23:08:51 +00:00
|
|
|
javacSupport = true;
|
|
|
|
odbcSupport = true;
|
|
|
|
};
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
erlang_23 = self.beamLib.callErlang ../development/interpreters/erlang/23.nix {
|
2022-09-14 18:05:37 +00:00
|
|
|
openssl = openssl_1_1;
|
2022-11-27 09:42:12 +00:00
|
|
|
wxGTK = wxGTK32;
|
2020-07-18 16:06:22 +00:00
|
|
|
# Can be enabled since the bug has been fixed in https://github.com/erlang/otp/pull/2508
|
|
|
|
parallelBuild = true;
|
2021-01-05 17:05:55 +00:00
|
|
|
autoconf = buildPackages.autoconf269;
|
2021-09-18 10:52:07 +00:00
|
|
|
inherit wxSupport systemdSupport;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-03-24 00:07:29 +00:00
|
|
|
erlang_23_odbc = self.interpreters.erlang_23.override { odbcSupport = true; };
|
|
|
|
erlang_23_javac = self.interpreters.erlang_23.override { javacSupport = true; };
|
|
|
|
erlang_23_odbc_javac = self.interpreters.erlang_23.override {
|
2021-02-05 17:12:51 +00:00
|
|
|
javacSupport = true;
|
|
|
|
odbcSupport = true;
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Other Beam languages. These are built with `beam.interpreters.erlang`. To
|
|
|
|
# access for example elixir built with different version of Erlang, use
|
2023-03-24 00:07:29 +00:00
|
|
|
# `beam.packages.erlang_24.elixir`.
|
2022-09-11 15:47:08 +00:00
|
|
|
inherit (self.packages.erlang)
|
2023-07-15 17:15:38 +00:00
|
|
|
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;
|
2023-03-24 00:07:29 +00:00
|
|
|
} // interpretersAliases;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Helper function to generate package set with a specific Erlang version.
|
2021-02-05 17:12:51 +00:00
|
|
|
packagesWith = erlang:
|
|
|
|
callPackage ../development/beam-modules { inherit erlang; };
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Each field in this tuple represents all Beam packages in nixpkgs built with
|
|
|
|
# appropriate Erlang/OTP version.
|
|
|
|
packages = {
|
2023-01-20 10:41:00 +00:00
|
|
|
erlang = self.packages.${self.latestVersion};
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
erlang_26 = self.packagesWith self.interpreters.erlang_26;
|
2023-03-24 00:07:29 +00:00
|
|
|
erlang_25 = self.packagesWith self.interpreters.erlang_25;
|
|
|
|
erlang_24 = self.packagesWith self.interpreters.erlang_24;
|
|
|
|
erlang_23 = self.packagesWith self.interpreters.erlang_23;
|
|
|
|
} // packagesAliases;
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|