neovim: use luajit on aarch64-darwin

This commit is contained in:
Luka Blaskovic
2021-08-26 09:15:32 +00:00
parent 9634784777
commit fff205f4a3
+1 -26
View File
@@ -28017,32 +28017,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 {
# 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
lua =
if (stdenv.isDarwin && stdenv.isAarch64) then lua5_1 else
luajit;
lua = luajit;
};
neovimUtils = callPackage ../applications/editors/neovim/utils.nix { };