Merge #63569: luaPackages.bit32: fix with LuaJIT
This commit is contained in:
commit
6df405b654
14
pkgs/development/lua-modules/bit32.patch
Normal file
14
pkgs/development/lua-modules/bit32.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff -Naur lua-compat-5.2/c-api/compat-5.2.h lua-compat-5.2-patched/c-api/compat-5.2.h
|
||||
--- lua-compat-5.2/c-api/compat-5.2.h 2015-02-19 09:23:42.000000000 +1100
|
||||
+++ lua-compat-5.2-patched/c-api/compat-5.2.h 2019-06-17 17:58:13.585361793 +1000
|
||||
@@ -146,8 +146,10 @@
|
||||
#define lua_pushglobaltable(L) \
|
||||
lua_pushvalue(L, LUA_GLOBALSINDEX)
|
||||
|
||||
+#if !defined(luaL_newlib)
|
||||
#define luaL_newlib(L, l) \
|
||||
(lua_newtable((L)),luaL_setfuncs((L), (l), 0))
|
||||
+#endif
|
||||
|
||||
void luaL_checkversion (lua_State *L);
|
||||
|
@ -6,10 +6,12 @@ with super;
|
||||
#### manual fixes for generated packages
|
||||
##########################################3
|
||||
bit32 = super.bit32.override({
|
||||
disabled = !isLua51;
|
||||
# Theoretically works with luajit, but it does redefine at least one Lua
|
||||
# 5.2 function that Luajit 2.1 provides, see:
|
||||
# https://github.com/LuaJIT/LuaJIT/issues/325
|
||||
# Small patch in order to no longer redefine a Lua 5.2 function that Luajit
|
||||
# 2.1 also provides, see https://github.com/LuaJIT/LuaJIT/issues/325 for
|
||||
# more
|
||||
patches = [
|
||||
./bit32.patch
|
||||
];
|
||||
});
|
||||
|
||||
busted = super.busted.override({
|
||||
|
Loading…
Reference in New Issue
Block a user