diff --git a/pkgs/development/interpreters/erlang/R16.nix b/pkgs/development/interpreters/erlang/R16.nix index 5945cdd8299d..23243803e8dc 100644 --- a/pkgs/development/interpreters/erlang/R16.nix +++ b/pkgs/development/interpreters/erlang/R16.nix @@ -1,13 +1,15 @@ { stdenv, fetchurl, perl, gnum4, ncurses, openssl , gnused, gawk, makeWrapper +, odbcSupport ? false, unixODBC ? null , wxSupport ? false, mesa ? null, wxGTK ? null, xlibs ? null }: assert wxSupport -> mesa != null && wxGTK != null && xlibs != null; +assert odbcSupport -> unixODBC != null; with stdenv.lib; stdenv.mkDerivation rec { - name = "erlang-" + version; + name = "erlang-" + version + "${optionalString odbcSupport "-odbc"}"; version = "16B03-1"; src = fetchurl { @@ -17,7 +19,8 @@ stdenv.mkDerivation rec { buildInputs = [ perl gnum4 ncurses openssl makeWrapper - ] ++ optional wxSupport [ mesa wxGTK xlibs.libX11 ]; + ] ++ optional wxSupport [ mesa wxGTK xlibs.libX11 ] + ++ optional odbcSupport [ unixODBC ]; patchPhase = '' sed -i "s@/bin/rm@rm@" lib/odbc/configure erts/configure ''; @@ -26,7 +29,7 @@ stdenv.mkDerivation rec { sed -e s@/bin/pwd@pwd@g -i otp_build ''; - configureFlags= "--with-ssl=${openssl} ${optionalString stdenv.isDarwin "--enable-darwin-64bit"}"; + configureFlags= "--with-ssl=${openssl} ${optionalString odbcSupport "--with-odbc=${unixODBC}"} ${optionalString stdenv.isDarwin "--enable-darwin-64bit"}"; postInstall = let manpages = fetchurl { diff --git a/pkgs/development/interpreters/erlang/R17.nix b/pkgs/development/interpreters/erlang/R17.nix index 2aba55d36792..83ea79d67f39 100644 --- a/pkgs/development/interpreters/erlang/R17.nix +++ b/pkgs/development/interpreters/erlang/R17.nix @@ -1,13 +1,15 @@ { stdenv, fetchurl, perl, gnum4, ncurses, openssl , gnused, gawk, makeWrapper +, odbcSupport ? false, unixODBC ? null , wxSupport ? false, mesa ? null, wxGTK ? null, xlibs ? null }: assert wxSupport -> mesa != null && wxGTK != null && xlibs != null; +assert odbcSupport -> unixODBC != null; with stdenv.lib; stdenv.mkDerivation rec { - name = "erlang-" + version; + name = "erlang-" + version + "${optionalString odbcSupport "-odbc"}"; version = "17.1"; src = fetchurl { @@ -17,7 +19,8 @@ stdenv.mkDerivation rec { buildInputs = [ perl gnum4 ncurses openssl makeWrapper - ] ++ optional wxSupport [ mesa wxGTK xlibs.libX11 ]; + ] ++ optional wxSupport [ mesa wxGTK xlibs.libX11 ] + ++ optional odbcSupport [ unixODBC ]; patchPhase = '' sed -i "s@/bin/rm@rm@" lib/odbc/configure erts/configure ''; @@ -26,7 +29,7 @@ stdenv.mkDerivation rec { sed -e s@/bin/pwd@pwd@g -i otp_build ''; - configureFlags= "--with-ssl=${openssl} ${optionalString stdenv.isDarwin "--enable-darwin-64bit"}"; + configureFlags= "--with-ssl=${openssl} ${optionalString odbcSupport "--with-odbc=${unixODBC}"} ${optionalString stdenv.isDarwin "--enable-darwin-64bit"}"; postInstall = let manpages = fetchurl { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ebfd4715d4b3..201120baecf3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3482,8 +3482,11 @@ let erlangR14 = callPackage ../development/interpreters/erlang/R14.nix { }; erlangR15 = callPackage ../development/interpreters/erlang/R15.nix { }; erlangR16 = callPackage ../development/interpreters/erlang/R16.nix { }; + erlangR16_odbc = callPackage ../development/interpreters/erlang/R16.nix { odbcSupport = true; }; erlangR17 = callPackage ../development/interpreters/erlang/R17.nix { }; + erlangR17_odbc = callPackage ../development/interpreters/erlang/R17.nix { odbcSupport = true; }; erlang = erlangR17; + erlang_odbc = erlangR17_odbc; rebar = callPackage ../development/tools/build-managers/rebar { };