Merge pull request #129543 from rvolosatovs/fix/neovim-lua-aarch64

Use luajit (again) with neovim on aarch64
This commit is contained in:
Jörg Thalheim 2021-07-08 05:55:23 +01:00 committed by GitHub
commit 5468e8341e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27489,7 +27489,32 @@ in
wrapNeovimUnstable = callPackage ../applications/editors/neovim/wrapper.nix { };
wrapNeovim = neovim-unwrapped: lib.makeOverridable (neovimUtils.legacyWrapper neovim-unwrapped);
neovim-unwrapped = callPackage ../applications/editors/neovim {
lua = luajit;
# neovim doesn't build with luajit on aarch64:
# ./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
lua =
if stdenv.isAarch64 then lua5_1 else
luajit;
};
neovimUtils = callPackage ../applications/editors/neovim/utils.nix { };