mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 17:53:37 +00:00
Merge pull request #134791 from gpanders/luajit-openresty
Use luajit-openresty with Neovim on aarch64-darwin
This commit is contained in:
commit
965c1c560a
@ -54,4 +54,9 @@ rec {
|
||||
inherit callPackage;
|
||||
};
|
||||
|
||||
luajit_openresty = import ../luajit/openresty.nix {
|
||||
self = luajit_openresty;
|
||||
inherit callPackage;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
{ self, callPackage, lib }:
|
||||
callPackage ./default.nix {
|
||||
inherit self;
|
||||
owner = "LuaJIT";
|
||||
repo = "LuaJIT";
|
||||
version = "2.0.5-2021-06-08";
|
||||
rev = "98f95f69180d48ce49289d6428b46a9ccdd67a46";
|
||||
isStable = true;
|
||||
|
@ -1,6 +1,8 @@
|
||||
{ self, callPackage }:
|
||||
callPackage ./default.nix {
|
||||
inherit self;
|
||||
owner = "LuaJIT";
|
||||
repo = "LuaJIT";
|
||||
version = "2.1.0-2021-06-25";
|
||||
rev = "e957737650e060d5bf1c2909b741cc3dffe073ac";
|
||||
isStable = false;
|
||||
|
@ -1,6 +1,8 @@
|
||||
{ lib, stdenv, fetchFromGitHub, buildPackages
|
||||
, name ? "luajit-${version}"
|
||||
, isStable
|
||||
, owner
|
||||
, repo
|
||||
, sha256
|
||||
, rev
|
||||
, version
|
||||
@ -41,9 +43,7 @@ in
|
||||
stdenv.mkDerivation rec {
|
||||
inherit name version;
|
||||
src = fetchFromGitHub {
|
||||
owner = "LuaJIT";
|
||||
repo = "LuaJIT";
|
||||
inherit sha256 rev;
|
||||
inherit owner repo sha256 rev;
|
||||
};
|
||||
|
||||
luaversion = "5.1";
|
||||
|
10
pkgs/development/interpreters/luajit/openresty.nix
Normal file
10
pkgs/development/interpreters/luajit/openresty.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{ self, callPackage }:
|
||||
callPackage ./default.nix rec {
|
||||
inherit self;
|
||||
owner = "openresty";
|
||||
repo = "luajit2";
|
||||
version = "2.1-20210510";
|
||||
rev = "v${version}";
|
||||
isStable = true;
|
||||
sha256 = "1h21w5axwka2j9jb86yc69qrprcavccyr2qihiw4b76r1zxzalvd";
|
||||
}
|
@ -12670,7 +12670,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_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_openresty luajit_2_1 luajit_2_0;
|
||||
|
||||
lua5 = lua5_2_compat;
|
||||
lua = lua5;
|
||||
@ -27983,31 +27983,11 @@ with pkgs;
|
||||
wrapNeovimUnstable = callPackage ../applications/editors/neovim/wrapper.nix { };
|
||||
wrapNeovim = neovim-unwrapped: lib.makeOverridable (neovimUtils.legacyWrapper neovim-unwrapped);
|
||||
neovim-unwrapped = callPackage ../applications/editors/neovim {
|
||||
# neovim doesn't build with luajit on aarch64-darwin :
|
||||
# ./luarocks init
|
||||
# PANIC: unprotected error in call to Lua API (module 'luarocks.core.hardcoded' not found:
|
||||
# no field package.preload['luarocks.core.hardcoded']
|
||||
# no file '/private/tmp/nix-build-luarocks-3.2.1.drv-0/source/src/luarocks/core/hardcoded.lua'
|
||||
# no file './luarocks/core/hardcoded.lua'
|
||||
# no file '/nix/store/3s6c509q9vvq3db87rfi7qa38wzxwz8w-luajit-2.1.0-2021-05-29/share/luajit-2.1.0-beta3/luarocks/core/hardcoded.lua'
|
||||
# no file '/usr/local/share/lua/5.1/luarocks/core/hardcoded.lua'
|
||||
# no file '/usr/local/share/lua/5.1/luarocks/core/hardcoded/init.lua'
|
||||
# no file '/nix/store/3s6c509q9vvq3db87rfi7qa38wzxwz8w-luajit-2.1.0-2021-05-29/share/lua/5.1/luarocks/core/hardcoded.lua'
|
||||
# no file '/nix/store/3s6c509q9vvq3db87rfi7qa38wzxwz8w-luajit-2.1.0-2021-05-29/share/lua/5.1/luarocks/core/hardcoded/init.lua'
|
||||
# no file './luarocks/core/hardcoded.so'
|
||||
# no file '/usr/local/lib/lua/5.1/luarocks/core/hardcoded.so'
|
||||
# no file '/nix/store/3s6c509q9vvq3db87rfi7qa38wzxwz8w-luajit-2.1.0-2021-05-29/lib/lua/5.1/luarocks/core/hardcoded.so'
|
||||
# no file '/usr/local/lib/lua/5.1/loadall.so'
|
||||
# no file './luarocks.so'
|
||||
# no file '/usr/local/lib/lua/5.1/luarocks.so'
|
||||
# no file '/nix/store/3s6c509q9vvq3db87rfi7qa38wzxwz8w-luajit-2.1.0-2021-05-29/lib/lua/5.1/luarocks.so'
|
||||
# no file '/usr/local/lib/lua/5.1/loadall.so')
|
||||
# make: *** [GNUmakefile:57: luarocks] Error 1
|
||||
#
|
||||
# See https://github.com/NixOS/nixpkgs/issues/129099
|
||||
# Possibly related: https://github.com/neovim/neovim/issues/7879
|
||||
# See:
|
||||
# - https://github.com/NixOS/nixpkgs/issues/129099
|
||||
# - https://github.com/NixOS/nixpkgs/issues/128959
|
||||
lua =
|
||||
if (stdenv.isDarwin && stdenv.isAarch64) then lua5_1 else
|
||||
if (stdenv.isDarwin && stdenv.isAarch64) then luajit_openresty else
|
||||
luajit;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user