Skip to content

Commit

Permalink
Merge pull request NixOS#303750 from chiroptical/add-erlang_27-rc2
Browse files Browse the repository at this point in the history
erlang_27: init at 27-rc2
  • Loading branch information
happysalada authored Apr 14, 2024
2 parents 2a96339 + 92b656e commit 038cdc9
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
6 changes: 6 additions & 0 deletions pkgs/development/interpreters/erlang/27-rc2.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{ mkDerivation }:

mkDerivation {
version = "27.0-rc2";
sha256 = "sha256-o+uqQMlrh7wJQbiecMnn3/tv6nqSJh7unOj0A95mMb0=";
}
16 changes: 16 additions & 0 deletions pkgs/development/interpreters/erlang/generic-builder.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
, libGLU ? null
, wxGTK ? null
, xorg ? null
, exdoc ? null
, parallelBuild ? false
, systemd
, wxSupport ? true
, exdocSupport ? false
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd # systemd support in epmd
# updateScript deps
, writeScript
Expand Down Expand Up @@ -77,6 +79,7 @@ else libGL != null && libGLU != null && wxGTK != null && xorg != null);

assert odbcSupport -> unixODBC != null;
assert javacSupport -> openjdk11 != null;
assert exdocSupport -> exdoc != null;

let
inherit (lib) optional optionals optionalAttrs optionalString;
Expand Down Expand Up @@ -114,8 +117,21 @@ stdenv.mkDerivation ({
${postPatch}
'';

# For OTP 27+ we need ex_doc to build the documentation
# When exdocSupport is enabled, grab the raw ex_doc executable from the exdoc
# derivation. Next, patch the first line to use the escript that will be
# built during the build phase of this derivation. Finally, building the
# documentation requires the erlang-logo.png asset.
preConfigure = ''
./otp_build autoconf
'' + optionalString exdocSupport ''
mkdir -p $out/bin
cp ${exdoc}/bin/.ex_doc-wrapped $out/bin/ex_doc
sed -i "1 s:^.*$:#!$out/bin/escript:" $out/bin/ex_doc
export EX_DOC=$out/bin/ex_doc
mkdir -p $out/lib/erlang/system/doc/assets
cp $src/system/doc/assets/erlang-logo.png $out/lib/erlang/system/doc/assets
'';

configureFlags = [ "--with-ssl=${lib.getOutput "out" opensslPackage}" ]
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17364,7 +17364,7 @@ with pkgs;
};

inherit (beam.interpreters)
erlang erlang_26 erlang_25 erlang_24
erlang erlang_27-rc2 erlang_26 erlang_25 erlang_24
erlang_odbc erlang_javac erlang_odbc_javac
elixir elixir_1_16 elixir_1_15 elixir_1_14 elixir_1_13 elixir_1_12 elixir_1_11 elixir_1_10
elixir-ls;
Expand Down
9 changes: 9 additions & 0 deletions pkgs/top-level/beam-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ in

# Standard Erlang versions, using the generic builder.

erlang_27-rc2 = self.beamLib.callErlang ../development/interpreters/erlang/27-rc2.nix {
wxGTK = wxGTK32;
parallelBuild = true;
autoconf = buildPackages.autoconf269;
exdocSupport = true;
exdoc = self.packages.erlang_26.ex_doc;
inherit wxSupport systemdSupport;
};

erlang_26 = self.beamLib.callErlang ../development/interpreters/erlang/26.nix {
wxGTK = wxGTK32;
parallelBuild = true;
Expand Down

0 comments on commit 038cdc9

Please sign in to comment.