Add a LUA_COMPAT_ALL version of Lua 5.2

This commit is contained in:
Michael Raskin 2014-01-12 22:15:26 +04:00
parent df5adbe307
commit 826e7f8a94
2 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, readline }:
{ stdenv, fetchurl, readline, compat ? false }:
let
dsoPatch = fetchurl {
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
patches = [ dsoPatch ];
configurePhase = ''
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC" LDLAGS="-fPIC" V=${majorVersion} R=${version} )
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDLAGS="-fPIC" V=${majorVersion} R=${version} )
installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.a liblua.so liblua.so.${majorVersion} liblua.so.${version}" INSTALL_DATA='cp -d' )
'';

View File

@ -3268,6 +3268,9 @@ let
lua5_0 = callPackage ../development/interpreters/lua-5/5.0.3.nix { };
lua5_1 = callPackage ../development/interpreters/lua-5/5.1.nix { };
lua5_2 = callPackage ../development/interpreters/lua-5/5.2.nix { };
lua5_2_compat = callPackage ../development/interpreters/lua-5/5.2.nix {
compat = true;
};
lua5 = lua5_1;
luarocks = callPackage ../development/tools/misc/luarocks {