From 826e7f8a9411f4433f3aff383a60447ec647cbc2 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Sun, 12 Jan 2014 22:15:26 +0400 Subject: [PATCH] Add a LUA_COMPAT_ALL version of Lua 5.2 --- pkgs/development/interpreters/lua-5/5.2.nix | 4 ++-- pkgs/top-level/all-packages.nix | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/lua-5/5.2.nix b/pkgs/development/interpreters/lua-5/5.2.nix index 5b4c2459872e..70ab0c3bdf8b 100644 --- a/pkgs/development/interpreters/lua-5/5.2.nix +++ b/pkgs/development/interpreters/lua-5/5.2.nix @@ -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' ) ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 46a41ed45459..6617d385c0eb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 {