From d7501b986a5d0f5a6ebe020d5f8bbb7c9d65b1ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 2 May 2017 13:47:36 +0200 Subject: [PATCH] luajit: 2.1.0-beta2 -> 2.1.0-beta3 The removal of `luaL_reg` alias caused lots of breakage. Only sysdig and knot-resolver needed (also) other changes. --- pkgs/desktops/enlightenment/efl.nix | 2 ++ pkgs/development/interpreters/love/0.10.nix | 2 ++ pkgs/development/interpreters/love/0.9.nix | 2 ++ pkgs/development/interpreters/luajit/default.nix | 4 ++-- pkgs/games/minetest/default.nix | 2 ++ pkgs/os-specific/linux/sysdig/default.nix | 6 ++++++ pkgs/servers/dns/knot-resolver/default.nix | 8 +++++++- pkgs/tools/networking/wrk/default.nix | 2 ++ 8 files changed, 25 insertions(+), 3 deletions(-) diff --git a/pkgs/desktops/enlightenment/efl.nix b/pkgs/desktops/enlightenment/efl.nix index 32b2fe31a5e2..2b92e3662965 100644 --- a/pkgs/desktops/enlightenment/efl.nix +++ b/pkgs/desktops/enlightenment/efl.nix @@ -61,6 +61,8 @@ stdenv.mkDerivation rec { source "$setupHook" ''; + NIX_CFLAGS_COMPILE = [ "-DluaL_reg=luaL_Reg" ]; # needed since luajit-2.1.0-beta3 + postInstall = '' substituteInPlace "$out/share/elua/core/util.lua" --replace '$out' "$out" modules=$(for i in "$out/include/"*/; do printf ' -I''${includedir}/'`basename $i`; done) diff --git a/pkgs/development/interpreters/love/0.10.nix b/pkgs/development/interpreters/love/0.10.nix index 04b574d45592..854052edf056 100644 --- a/pkgs/development/interpreters/love/0.10.nix +++ b/pkgs/development/interpreters/love/0.10.nix @@ -28,6 +28,8 @@ stdenv.mkDerivation rec { "--with-lua=luajit" ]; + NIX_CFLAGS_COMPILE = [ "-DluaL_reg=luaL_Reg" ]; # needed since luajit-2.1.0-beta3 + meta = { homepage = "http://love2d.org"; description = "A Lua-based 2D game engine/scripting language"; diff --git a/pkgs/development/interpreters/love/0.9.nix b/pkgs/development/interpreters/love/0.9.nix index f08d1d2ec7e0..da733ef29a85 100644 --- a/pkgs/development/interpreters/love/0.9.nix +++ b/pkgs/development/interpreters/love/0.9.nix @@ -20,6 +20,8 @@ stdenv.mkDerivation rec { "--with-lua=luajit" ]; + NIX_CFLAGS_COMPILE = [ "-DluaL_reg=luaL_Reg" ]; # needed since luajit-2.1.0-beta3 + meta = { homepage = "http://love2d.org"; description = "A Lua-based 2D game engine/scripting language"; diff --git a/pkgs/development/interpreters/luajit/default.nix b/pkgs/development/interpreters/luajit/default.nix index 6da5c265aaf6..1694e3e48509 100644 --- a/pkgs/development/interpreters/luajit/default.nix +++ b/pkgs/development/interpreters/luajit/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation rec { name = "luajit-${version}"; - version = "2.1.0-beta2"; + version = "2.1.0-beta3"; luaversion = "5.1"; src = fetchurl { url = "http://luajit.org/download/LuaJIT-${version}.tar.gz"; - sha256 = "0iyghj1xjlmd9ywa4flf9yszynf3jhbp0yqb9b49k7ab0g528fbi"; + sha256 = "1hyrhpkwjqsv54hnnx4cl8vk44h9d6c9w0fz1jfjz00w255y7lhs"; }; enableParallelBuilding = true; diff --git a/pkgs/games/minetest/default.nix b/pkgs/games/minetest/default.nix index b8cfe512c370..b40083bedba8 100644 --- a/pkgs/games/minetest/default.nix +++ b/pkgs/games/minetest/default.nix @@ -33,6 +33,8 @@ in stdenv.mkDerivation { "-DIRRLICHT_INCLUDE_DIR=${irrlicht}/include/irrlicht" ]; + NIX_CFLAGS_COMPILE = [ "-DluaL_reg=luaL_Reg" ]; # needed since luajit-2.1.0-beta3 + buildInputs = [ cmake irrlicht libpng bzip2 libjpeg curl libogg jsoncpp libXxf86vm mesa openal libvorbis xlibsWrapper sqlite luajit freetype gettext doxygen ncurses diff --git a/pkgs/os-specific/linux/sysdig/default.nix b/pkgs/os-specific/linux/sysdig/default.nix index 27a0d301acf9..ad2cace270b2 100644 --- a/pkgs/os-specific/linux/sysdig/default.nix +++ b/pkgs/os-specific/linux/sysdig/default.nix @@ -25,6 +25,12 @@ stdenv.mkDerivation rec { "-DSYSDIG_VERSION=${version}" ] ++ optional (kernel == null) "-DBUILD_DRIVER=OFF"; + # needed since luajit-2.1.0-beta3 + NIX_CFLAGS_COMPILE = [ + "-DluaL_reg=luaL_Reg" + "-DluaL_getn(L,i)=((int)lua_objlen(L,i))" + ]; + preConfigure = '' export INSTALL_MOD_PATH="$out" '' + optionalString (kernel != null) '' diff --git a/pkgs/servers/dns/knot-resolver/default.nix b/pkgs/servers/dns/knot-resolver/default.nix index f388302f4bf5..c60e7232b79e 100644 --- a/pkgs/servers/dns/knot-resolver/default.nix +++ b/pkgs/servers/dns/knot-resolver/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, utillinux, hexdump, which +{ stdenv, fetchurl, fetchpatch, pkgconfig, utillinux, hexdump, which , knot-dns, luajit, libuv, lmdb , cmocka, systemd, hiredis, libmemcached , gnutls, nettle @@ -17,6 +17,12 @@ stdenv.mkDerivation rec { sha256 = "31e1b8899c5592433e5265a8e9685126fc5aeff3bd6b10884154b2e34b786f3c"; }; + patches = [(fetchpatch { + name = "luajit-2.1.0-beta3.diff"; + url = https://gitlab.labs.nic.cz/knot/resolver/merge_requests/289.diff; + sha256 = "1cgfi715qhmvb31ri2wr6cacsjvb1dqavdmnnl1074y25zalxfax"; + })]; + outputs = [ "out" "dev" ]; configurePhase = ":"; diff --git a/pkgs/tools/networking/wrk/default.nix b/pkgs/tools/networking/wrk/default.nix index 226180196fd7..7c72c2cd210c 100644 --- a/pkgs/tools/networking/wrk/default.nix +++ b/pkgs/tools/networking/wrk/default.nix @@ -21,6 +21,8 @@ stdenv.mkDerivation rec { --replace "#include