@@ -1,15 +1,19 @@
11{ stdenv, fetchurl, perl, gnum4, ncurses, openssl
22, gnused, gawk, makeWrapper
33, odbcSupport ? false, unixODBC ? null
4−, wxSupport ? false, mesa ? null, wxGTK ? null, xlibs ? null }:
4+, wxSupport ? true, mesa ? null, wxGTK ? null, xlibs ? null
5+, javacSupport ? false, openjdk ? null
6+, enableHipe ? true}:
57
68assert wxSupport -> mesa != null && wxGTK != null && xlibs != null;
79assert odbcSupport -> unixODBC != null;
10+assert javacSupport -> openjdk != null;
811
912with stdenv.lib;
1013
1114stdenv.mkDerivation rec {
12− name = "erlang-" + version + "${optionalString odbcSupport "-odbc"}";
15+ name = "erlang-" + version + "${optionalString odbcSupport "-odbc"}"
16+ + "${optionalString javacSupport "-javac"}";
1317 version = "17.4";
1418
1519 src = fetchurl {
@@ -20,7 +24,8 @@ stdenv.mkDerivation rec {
2024 buildInputs =
2125 [ perl gnum4 ncurses openssl makeWrapper
2226 ] ++ optional wxSupport [ mesa wxGTK xlibs.libX11 ]
23− ++ optional odbcSupport [ unixODBC ];
27+ ++ optional odbcSupport [ unixODBC ]
28+ ++ optional javacSupport [ openjdk ];
2429
2530 patchPhase = '' sed -i "s@/bin/rm@rm@" lib/odbc/configure erts/configure '';
2631
@@ -29,7 +34,7 @@ stdenv.mkDerivation rec {
2934 sed -e s@/bin/pwd@pwd@g -i otp_build
3035 '';
3136
32− configureFlags= "--with-ssl=${openssl} ${optionalString odbcSupport "--with-odbc=${unixODBC}"} ${optionalString stdenv.isDarwin "--enable-darwin-64bit"}";
37+ configureFlags= "--with-ssl=${openssl} ${optionalString enableHipe "--enable-hipe"} ${optionalString odbcSupport "--with-odbc=${unixODBC}"} ${optionalString stdenv.isDarwin "--enable-darwin-64bit"} ${optionalString javacSupport "--with-javac"}";
3338
3439 postInstall = let
3540 manpages = fetchurl {
@@ -68,6 +73,6 @@ stdenv.mkDerivation rec {
6873 platforms = platforms.unix;
6974 # Note: Maintainer of prev. erlang version was simons. If he wants
7075 # to continue maintaining erlang I'm totally ok with that.
71− maintainers = [ maintainers.the-kenny ];
76+ maintainers = [ maintainers.the-kenny maintainers.sjmackenzie ];
7277 };
7378}