diff options
Diffstat (limited to 'pkgs/development/interpreters/erlang/R16.nix')
-rw-r--r-- | pkgs/development/interpreters/erlang/R16.nix | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pkgs/development/interpreters/erlang/R16.nix b/pkgs/development/interpreters/erlang/R16.nix index 5945cdd8299..23243803e8d 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 { |