git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commitf80b906b3a4236320f92245a596204a3bfbe8543 authorDoron Behar <doron.behar@gmail.com> dateTue 29 Mar 2022, 05:48 (5 years ago) parentd3dcc10
2 files changed+10−14
pkgs/applications/editors/neovim/default.nix+9−13 pkgs/development/lua-modules/overrides.nix+1−1
pkgs/applications/editors/neovim/default.nix+9−13
@@ -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
pkgs/development/lua-modules/overrides.nix+1−1
@@ -281,7 +281,7 @@ with prev;
281281 });
282282
283283
284− # as advised in https://github.com/luarocks/luarocks/issues/1402
284+ # as advised in https://github.com/luarocks/luarocks/issues/1402#issuecomment-1080616570
285285 # we shouldn't use luarocks machinery to build complex cmake components
286286 libluv = pkgs.stdenv.mkDerivation {
287287