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;
|
inherit callPackage;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
luajit_openresty = import ../luajit/openresty.nix {
|
||||||
|
self = luajit_openresty;
|
||||||
|
inherit callPackage;
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
{ self, callPackage, lib }:
|
{ self, callPackage, lib }:
|
||||||
callPackage ./default.nix {
|
callPackage ./default.nix {
|
||||||
inherit self;
|
inherit self;
|
||||||
|
owner = "LuaJIT";
|
||||||
|
repo = "LuaJIT";
|
||||||
version = "2.0.5-2021-06-08";
|
version = "2.0.5-2021-06-08";
|
||||||
rev = "98f95f69180d48ce49289d6428b46a9ccdd67a46";
|
rev = "98f95f69180d48ce49289d6428b46a9ccdd67a46";
|
||||||
isStable = true;
|
isStable = true;
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
{ self, callPackage }:
|
{ self, callPackage }:
|
||||||
callPackage ./default.nix {
|
callPackage ./default.nix {
|
||||||
inherit self;
|
inherit self;
|
||||||
|
owner = "LuaJIT";
|
||||||
|
repo = "LuaJIT";
|
||||||
version = "2.1.0-2021-06-25";
|
version = "2.1.0-2021-06-25";
|
||||||
rev = "e957737650e060d5bf1c2909b741cc3dffe073ac";
|
rev = "e957737650e060d5bf1c2909b741cc3dffe073ac";
|
||||||
isStable = false;
|
isStable = false;
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, buildPackages
|
{ lib, stdenv, fetchFromGitHub, buildPackages
|
||||||
, name ? "luajit-${version}"
|
, name ? "luajit-${version}"
|
||||||
, isStable
|
, isStable
|
||||||
|
, owner
|
||||||
|
, repo
|
||||||
, sha256
|
, sha256
|
||||||
, rev
|
, rev
|
||||||
, version
|
, version
|
||||||
@ -41,9 +43,7 @@ in
|
|||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
inherit name version;
|
inherit name version;
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "LuaJIT";
|
inherit owner repo sha256 rev;
|
||||||
repo = "LuaJIT";
|
|
||||||
inherit sha256 rev;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
luaversion = "5.1";
|
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
|
### LUA interpreters
|
||||||
luaInterpreters = callPackage ./../development/interpreters/lua-5 {};
|
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;
|
lua5 = lua5_2_compat;
|
||||||
lua = lua5;
|
lua = lua5;
|
||||||
@ -27983,31 +27983,11 @@ with pkgs;
|
|||||||
wrapNeovimUnstable = callPackage ../applications/editors/neovim/wrapper.nix { };
|
wrapNeovimUnstable = callPackage ../applications/editors/neovim/wrapper.nix { };
|
||||||
wrapNeovim = neovim-unwrapped: lib.makeOverridable (neovimUtils.legacyWrapper neovim-unwrapped);
|
wrapNeovim = neovim-unwrapped: lib.makeOverridable (neovimUtils.legacyWrapper neovim-unwrapped);
|
||||||
neovim-unwrapped = callPackage ../applications/editors/neovim {
|
neovim-unwrapped = callPackage ../applications/editors/neovim {
|
||||||
# neovim doesn't build with luajit on aarch64-darwin :
|
# See:
|
||||||
# ./luarocks init
|
# - https://github.com/NixOS/nixpkgs/issues/129099
|
||||||
# PANIC: unprotected error in call to Lua API (module 'luarocks.core.hardcoded' not found:
|
# - https://github.com/NixOS/nixpkgs/issues/128959
|
||||||
# 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
|
|
||||||
lua =
|
lua =
|
||||||
if (stdenv.isDarwin && stdenv.isAarch64) then lua5_1 else
|
if (stdenv.isDarwin && stdenv.isAarch64) then luajit_openresty else
|
||||||
luajit;
|
luajit;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user