Merge #94790: luajit*: bugfix updates

This commit is contained in:
Vladimír Čunát 2020-08-11 22:34:22 +02:00
commit 48618a1ab3
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
5 changed files with 46 additions and 7 deletions

View File

@ -1,10 +1,10 @@
{ self, callPackage, lib }: { self, callPackage, lib }:
callPackage ./default.nix { callPackage ./default.nix {
inherit self; inherit self;
version = "2.0.5-2020-03-20"; version = "2.0.5-2020-08-05";
rev = "e613105"; rev = "2211f6f";
isStable = true; isStable = true;
sha256 = "0k843z90s4hi0qhri6ixy8sv21nig8jwbznpqgqg845ji530kqj7"; sha256 = "01adxmknq2xyb3w9sn8ilnar8181h7ksd9i80yrsbwzix5lwkn6m";
extraMeta = { # this isn't precise but it at least stops the useless Hydra build extraMeta = { # this isn't precise but it at least stops the useless Hydra build
platforms = with lib; filter (p: p != "aarch64-linux") platforms = with lib; filter (p: p != "aarch64-linux")
(platforms.linux ++ platforms.darwin); (platforms.linux ++ platforms.darwin);

View File

@ -1,8 +1,8 @@
{ self, callPackage }: { self, callPackage }:
callPackage ./default.nix { callPackage ./default.nix {
inherit self; inherit self;
version = "2.1.0-2020-03-20"; version = "2.1.0-2020-08-05";
rev = "9143e86"; rev = "10ddae7";
isStable = false; isStable = false;
sha256 = "1zw1yr0375d6jr5x20zvkvk76hkaqamjynbswpl604w6r6id070b"; sha256 = "1lmjs0gz9vgbhh5f45jvvibpj7f3sz81r8cz4maln9yhc67f2zmk";
} }

View File

@ -104,6 +104,6 @@ stdenv.mkDerivation rec {
homepage = "http://luajit.org"; homepage = "http://luajit.org";
license = licenses.mit; license = licenses.mit;
platforms = platforms.linux ++ platforms.darwin; platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ thoughtpolice smironov vcunat andir ]; maintainers = with maintainers; [ thoughtpolice smironov vcunat andir lblasc ];
} // extraMeta; } // extraMeta;
} }

View File

@ -0,0 +1,36 @@
diff --git a/src/lxplib.c b/src/lxplib.c
index 1c972db..5712611 100644
--- a/src/lxplib.c
+++ b/src/lxplib.c
@@ -590,7 +590,7 @@ static void set_info (lua_State *L) {
/*
** Adapted from Lua 5.2.0
*/
-static void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) {
+static void compat_luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) {
luaL_checkstack(L, nup, "too many upvalues");
for (; l->name != NULL; l++) { /* fill the table with given functions */
int i;
@@ -602,6 +602,8 @@ static void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) {
}
lua_pop(L, nup); /* remove upvalues */
}
+#else
+#define compat_luaL_setfuncs(L, reg, nup) luaL_setfuncs(L, reg, nup)
#endif
@@ -612,11 +614,11 @@ int luaopen_lxp (lua_State *L) {
lua_pushvalue(L, -2);
lua_rawset(L, -3);
- luaL_setfuncs (L, lxp_meths, 0);
+ compat_luaL_setfuncs (L, lxp_meths, 0);
lua_pop (L, 1); /* remove metatable */
lua_newtable (L);
- luaL_setfuncs (L, lxp_funcs, 0);
+ compat_luaL_setfuncs (L, lxp_funcs, 0);
set_info (L);
return 1;
}

View File

@ -204,6 +204,9 @@ with super;
externalDeps = [ externalDeps = [
{ name = "EXPAT"; dep = pkgs.expat; } { name = "EXPAT"; dep = pkgs.expat; }
]; ];
patches = [
./luaexpat.patch
];
}); });
# TODO Somehow automatically amend buildInputs for things that need luaffi # TODO Somehow automatically amend buildInputs for things that need luaffi