neovim: cleanup a bit libluv related hacks
Remove unneeded cmakeFlags and explain more what is the difference between lua.pkgs.libluv and lua.pkgs.luv.
This commit is contained in:
parent
d3dcc106c8
commit
f80b906b3a
2 changed files with 10 additions and 14 deletions
|
@ -21,14 +21,6 @@ let
|
||||||
));
|
));
|
||||||
|
|
||||||
pyEnv = python3.withPackages(ps: with ps; [ pynvim msgpack ]);
|
pyEnv = python3.withPackages(ps: with ps; [ pynvim msgpack ]);
|
||||||
|
|
||||||
# FIXME: this is verry messy and strange.
|
|
||||||
# see https://github.com/NixOS/nixpkgs/pull/80528
|
|
||||||
luv = lua.pkgs.luv;
|
|
||||||
luvpath = with builtins ; if stdenv.isDarwin
|
|
||||||
then "${luv.libluv}/lib/lua/${lua.luaversion}/libluv.${head (match "([0-9.]+).*" luv.version)}.dylib"
|
|
||||||
else "${luv}/lib/lua/${lua.luaversion}/luv.so";
|
|
||||||
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "neovim-unwrapped";
|
pname = "neovim-unwrapped";
|
||||||
|
@ -57,7 +49,11 @@ in
|
||||||
libtermkey
|
libtermkey
|
||||||
libuv
|
libuv
|
||||||
libvterm-neovim
|
libvterm-neovim
|
||||||
luv.libluv
|
# This is actually a c library, hence it's not included in neovimLuaEnv,
|
||||||
|
# see:
|
||||||
|
# https://github.com/luarocks/luarocks/issues/1402#issuecomment-1080616570
|
||||||
|
# and it's definition at: pkgs/development/lua-modules/overrides.nix
|
||||||
|
lua.pkgs.libluv
|
||||||
msgpack
|
msgpack
|
||||||
ncurses
|
ncurses
|
||||||
neovimLuaEnv
|
neovimLuaEnv
|
||||||
|
@ -97,12 +93,12 @@ in
|
||||||
disallowedReferences = [ stdenv.cc ];
|
disallowedReferences = [ stdenv.cc ];
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DGPERF_PRG=${gperf}/bin/gperf"
|
# Don't use downloaded dependencies. At the end of the configurePhase one
|
||||||
"-DLUA_PRG=${neovimLuaEnv.interpreter}"
|
# can spot that cmake says this option was "not used by the project".
|
||||||
"-DLIBLUV_LIBRARY=${luvpath}"
|
# That's because all dependencies were found and
|
||||||
|
# third-party/CMakeLists.txt is not read at all.
|
||||||
"-DUSE_BUNDLED=OFF"
|
"-DUSE_BUNDLED=OFF"
|
||||||
]
|
]
|
||||||
++ optional doCheck "-DBUSTED_PRG=${neovimLuaEnv}/bin/busted"
|
|
||||||
++ optional (!lua.pkgs.isLuaJIT) "-DPREFER_LUA=ON"
|
++ optional (!lua.pkgs.isLuaJIT) "-DPREFER_LUA=ON"
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -281,7 +281,7 @@ with prev;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
# as advised in https://github.com/luarocks/luarocks/issues/1402
|
# as advised in https://github.com/luarocks/luarocks/issues/1402#issuecomment-1080616570
|
||||||
# we shouldn't use luarocks machinery to build complex cmake components
|
# we shouldn't use luarocks machinery to build complex cmake components
|
||||||
libluv = pkgs.stdenv.mkDerivation {
|
libluv = pkgs.stdenv.mkDerivation {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue