@@ -21,14 +21,6 @@ let
2121 ));
2222
2323 pyEnv = python3.withPackages(ps: with ps; [ pynvim msgpack ]);
24−
25− # FIXME: this is verry messy and strange.
26− # see https://github.com/NixOS/nixpkgs/pull/80528
27− luv = lua.pkgs.luv;
28− luvpath = with builtins ; if stdenv.isDarwin
29− then "${luv.libluv}/lib/lua/${lua.luaversion}/libluv.${head (match "([0-9.]+).*" luv.version)}.dylib"
30− else "${luv}/lib/lua/${lua.luaversion}/luv.so";
31−
3224in
3325 stdenv.mkDerivation rec {
3426 pname = "neovim-unwrapped";
@@ -57,7 +49,11 @@ in
5749 libtermkey
5850 libuv
5951 libvterm-neovim
60− luv.libluv
52+ # This is actually a c library, hence it's not included in neovimLuaEnv,
53+ # see:
54+ # https://github.com/luarocks/luarocks/issues/1402#issuecomment-1080616570
55+ # and it's definition at: pkgs/development/lua-modules/overrides.nix
56+ lua.pkgs.libluv
6157 msgpack
6258 ncurses
6359 neovimLuaEnv
@@ -97,12 +93,12 @@ in
9793 disallowedReferences = [ stdenv.cc ];
9894
9995 cmakeFlags = [
100− "-DGPERF_PRG=${gperf}/bin/gperf"
101− "-DLUA_PRG=${neovimLuaEnv.interpreter}"
102− "-DLIBLUV_LIBRARY=${luvpath}"
96+ # Don't use downloaded dependencies. At the end of the configurePhase one
97+ # can spot that cmake says this option was "not used by the project".
98+ # That's because all dependencies were found and
99+ # third-party/CMakeLists.txt is not read at all.
103100 "-DUSE_BUNDLED=OFF"
104101 ]
105− ++ optional doCheck "-DBUSTED_PRG=${neovimLuaEnv}/bin/busted"
106102 ++ optional (!lua.pkgs.isLuaJIT) "-DPREFER_LUA=ON"
107103 ;
108104