Merge #135672: LuaJIT: bump, fix issue with pcall
This commit is contained in:
commit
1c866bd1ae
7 changed files with 54 additions and 55 deletions
|
@ -54,9 +54,4 @@ rec {
|
|||
inherit callPackage;
|
||||
};
|
||||
|
||||
luajit_openresty = import ../luajit/openresty.nix {
|
||||
self = luajit_openresty;
|
||||
inherit callPackage;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
{ self, callPackage, lib }:
|
||||
callPackage ./default.nix {
|
||||
inherit self;
|
||||
owner = "LuaJIT";
|
||||
repo = "LuaJIT";
|
||||
version = "2.0.5-2021-06-08";
|
||||
rev = "98f95f69180d48ce49289d6428b46a9ccdd67a46";
|
||||
version = "2.0.5-2021-07-27";
|
||||
rev = "3a654999c6f00de4cb9e61232d23579442e544a0";
|
||||
isStable = true;
|
||||
sha256 = "1pdmhk5syp0nir80xcnkf6xy2w5rwslak8hgmjpgaxzlnrjcgs7p";
|
||||
sha256 = "0q187vn6bspn9i33hrvfy59mh83nd8jjmik5qkkkc3vls13jxr6z";
|
||||
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: !hasPrefix "aarch64-" p)
|
||||
(platforms.linux ++ platforms.darwin);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
{ self, callPackage }:
|
||||
callPackage ./default.nix {
|
||||
inherit self;
|
||||
owner = "LuaJIT";
|
||||
repo = "LuaJIT";
|
||||
version = "2.1.0-2021-06-25";
|
||||
rev = "e957737650e060d5bf1c2909b741cc3dffe073ac";
|
||||
version = "2.1.0-2021-08-12";
|
||||
rev = "8ff09d9f5ad5b037926be2a50dc32b681c5e7597";
|
||||
isStable = false;
|
||||
sha256 = "04i7n5xdd1nci4mv2p6bv71fq5b1nkswz12hcgirsxqbnkrlbbcj";
|
||||
sha256 = "18wp8sgmiwlslnvgs35cy35ji2igksyfm3f8hrx07hqmsq2d77vr";
|
||||
}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 2538503f..7e6380da 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -320,7 +320,9 @@ ifeq (Darwin,$(TARGET_SYS))
|
||||
$(error missing: export MACOSX_DEPLOYMENT_TARGET=XX.YY)
|
||||
endif
|
||||
TARGET_STRIP+= -x
|
||||
+ ifneq (arm64,$(shell uname -m))
|
||||
TARGET_XCFLAGS+= -DLUAJIT_UNWIND_EXTERNAL
|
||||
+ endif
|
||||
TARGET_XSHLDFLAGS= -dynamiclib -single_module -undefined dynamic_lookup -fPIC
|
||||
TARGET_DYNXLDOPTS=
|
||||
TARGET_XSHLDFLAGS+= -install_name $(TARGET_DYLIBPATH) -compatibility_version $(MAJVER).$(MINVER) -current_version $(MAJVER).$(MINVER).$(RELVER)
|
|
@ -1,15 +1,16 @@
|
|||
{ lib, stdenv, fetchFromGitHub, buildPackages
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, buildPackages
|
||||
, name ? "luajit-${version}"
|
||||
, isStable
|
||||
, owner
|
||||
, repo
|
||||
, sha256
|
||||
, rev
|
||||
, version
|
||||
, extraMeta ? {}
|
||||
, extraMeta ? { }
|
||||
, callPackage
|
||||
, self
|
||||
, packageOverrides ? (self: super: {})
|
||||
, packageOverrides ? (self: super: { })
|
||||
, enableFFI ? true
|
||||
, enableJIT ? true
|
||||
, enableJITDebugModule ? enableJIT
|
||||
|
@ -26,28 +27,34 @@ assert enableJITDebugModule -> enableJIT;
|
|||
assert enableGDBJITSupport -> enableJIT;
|
||||
assert enableValgrindSupport -> valgrind != null;
|
||||
let
|
||||
luaPackages = callPackage ../../lua-modules {lua=self; overrides=packageOverrides;};
|
||||
luaPackages = callPackage ../../lua-modules { lua = self; overrides = packageOverrides; };
|
||||
|
||||
XCFLAGS = with lib;
|
||||
optional (!enableFFI) "-DLUAJIT_DISABLE_FFI"
|
||||
++ optional (!enableJIT) "-DLUAJIT_DISABLE_JIT"
|
||||
++ optional enable52Compat "-DLUAJIT_ENABLE_LUA52COMPAT"
|
||||
++ optional (!enableGC64) "-DLUAJIT_DISABLE_GC64"
|
||||
++ optional useSystemMalloc "-DLUAJIT_USE_SYSMALLOC"
|
||||
++ optional enableValgrindSupport "-DLUAJIT_USE_VALGRIND"
|
||||
++ optional enableGDBJITSupport "-DLUAJIT_USE_GDBJIT"
|
||||
++ optional enableAPICheck "-DLUAJIT_USE_APICHECK"
|
||||
++ optional enableVMAssertions "-DLUAJIT_USE_ASSERT"
|
||||
optional (!enableFFI) "-DLUAJIT_DISABLE_FFI"
|
||||
++ optional (!enableJIT) "-DLUAJIT_DISABLE_JIT"
|
||||
++ optional enable52Compat "-DLUAJIT_ENABLE_LUA52COMPAT"
|
||||
++ optional (!enableGC64) "-DLUAJIT_DISABLE_GC64"
|
||||
++ optional useSystemMalloc "-DLUAJIT_USE_SYSMALLOC"
|
||||
++ optional enableValgrindSupport "-DLUAJIT_USE_VALGRIND"
|
||||
++ optional enableGDBJITSupport "-DLUAJIT_USE_GDBJIT"
|
||||
++ optional enableAPICheck "-DLUAJIT_USE_APICHECK"
|
||||
++ optional enableVMAssertions "-DLUAJIT_USE_ASSERT"
|
||||
;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
inherit name version;
|
||||
src = fetchFromGitHub {
|
||||
inherit owner repo sha256 rev;
|
||||
owner = "LuaJIT";
|
||||
repo = "LuaJIT";
|
||||
inherit sha256 rev;
|
||||
};
|
||||
|
||||
luaversion = "5.1";
|
||||
|
||||
# Fix for pcall on aarch64-darwin.
|
||||
# Upstream issue: https://github.com/LuaJIT/LuaJIT/issues/698
|
||||
patches = lib.optionals (stdenv.hostPlatform.system == "aarch64-darwin") [ ./aarch64-darwin-disable-unwind-external.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile --replace ldconfig :
|
||||
if test -n "''${dontStrip-}"; then
|
||||
|
@ -82,8 +89,10 @@ stdenv.mkDerivation rec {
|
|||
'';
|
||||
|
||||
LuaPathSearchPaths = [
|
||||
"lib/lua/${luaversion}/?.lua" "share/lua/${luaversion}/?.lua"
|
||||
"share/lua/${luaversion}/?/init.lua" "lib/lua/${luaversion}/?/init.lua"
|
||||
"lib/lua/${luaversion}/?.lua"
|
||||
"share/lua/${luaversion}/?.lua"
|
||||
"share/lua/${luaversion}/?/init.lua"
|
||||
"lib/lua/${luaversion}/?/init.lua"
|
||||
"share/${name}/?.lua"
|
||||
];
|
||||
LuaCPathSearchPaths = [ "lib/lua/${luaversion}/?.so" "share/lua/${luaversion}/?.so" ];
|
||||
|
@ -94,16 +103,16 @@ stdenv.mkDerivation rec {
|
|||
lua = self;
|
||||
inherit (luaPackages) requiredLuaModules;
|
||||
};
|
||||
withPackages = import ../lua-5/with-packages.nix { inherit buildEnv luaPackages;};
|
||||
withPackages = import ../lua-5/with-packages.nix { inherit buildEnv luaPackages; };
|
||||
pkgs = luaPackages;
|
||||
interpreter = "${self}/bin/lua";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "High-performance JIT compiler for Lua 5.1";
|
||||
homepage = "http://luajit.org";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
homepage = "http://luajit.org";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ thoughtpolice smironov vcunat andir lblasc ];
|
||||
} // extraMeta;
|
||||
}
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
{ self, callPackage }:
|
||||
callPackage ./default.nix rec {
|
||||
inherit self;
|
||||
owner = "openresty";
|
||||
repo = "luajit2";
|
||||
version = "2.1-20210510";
|
||||
rev = "v${version}";
|
||||
isStable = true;
|
||||
sha256 = "1h21w5axwka2j9jb86yc69qrprcavccyr2qihiw4b76r1zxzalvd";
|
||||
}
|
|
@ -12726,7 +12726,7 @@ with pkgs;
|
|||
|
||||
### LUA interpreters
|
||||
luaInterpreters = callPackage ./../development/interpreters/lua-5 {};
|
||||
inherit (luaInterpreters) lua5_1 lua5_2 lua5_2_compat lua5_3 lua5_3_compat lua5_4 lua5_4_compat luajit_openresty luajit_2_1 luajit_2_0;
|
||||
inherit (luaInterpreters) lua5_1 lua5_2 lua5_2_compat lua5_3 lua5_3_compat lua5_4 lua5_4_compat luajit_2_1 luajit_2_0;
|
||||
|
||||
lua5 = lua5_2_compat;
|
||||
lua = lua5;
|
||||
|
@ -28112,12 +28112,7 @@ with pkgs;
|
|||
wrapNeovimUnstable = callPackage ../applications/editors/neovim/wrapper.nix { };
|
||||
wrapNeovim = neovim-unwrapped: lib.makeOverridable (neovimUtils.legacyWrapper neovim-unwrapped);
|
||||
neovim-unwrapped = callPackage ../applications/editors/neovim {
|
||||
# See:
|
||||
# - https://github.com/NixOS/nixpkgs/issues/129099
|
||||
# - https://github.com/NixOS/nixpkgs/issues/128959
|
||||
lua =
|
||||
if (stdenv.isDarwin && stdenv.isAarch64) then luajit_openresty else
|
||||
luajit;
|
||||
lua = luajit;
|
||||
};
|
||||
|
||||
neovimUtils = callPackage ../applications/editors/neovim/utils.nix { };
|
||||
|
|
Loading…
Reference in a new issue