Support odbc in erlang R16 and R17

This commit is contained in:
Dmitry Belyaev 2014-08-15 11:14:54 +10:00
parent 2a6c7e2874
commit 93697e85ca
3 changed files with 15 additions and 6 deletions

View file

@ -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 {

View file

@ -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 {

View file

@ -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 { };