neovim: fix build on Darwin

libluv path passed to -DLIBLUV_LIBRARY broken by change in libluv, eg:
libluv.dylib -> libluv.1.30.0.dylib

Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
This commit is contained in:
Sirio Balmelli 2020-08-13 20:50:06 +02:00
parent 00c4808252
commit 0f1434cb2a
No known key found for this signature in database
GPG key ID: 0437A96EFE4C426E

View file

@ -20,6 +20,14 @@ let
));
pyEnv = python.withPackages(ps: [ ps.pynvim ps.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
stdenv.mkDerivation rec {
pname = "neovim-unwrapped";
@ -47,7 +55,7 @@ in
libtermkey
libuv
libvterm-neovim
lua.pkgs.luv.libluv
luv.libluv
msgpack
ncurses
neovimLuaEnv
@ -88,10 +96,8 @@ in
cmakeFlags = [
"-DGPERF_PRG=${gperf}/bin/gperf"
"-DLUA_PRG=${neovimLuaEnv.interpreter}"
"-DLIBLUV_LIBRARY=${luvpath}"
]
# FIXME: this is verry messy and strange.
++ optional (!stdenv.isDarwin) "-DLIBLUV_LIBRARY=${lua.pkgs.luv}/lib/lua/${lua.luaversion}/luv.so"
++ optional (stdenv.isDarwin) "-DLIBLUV_LIBRARY=${lua.pkgs.luv.libluv}/lib/lua/${lua.luaversion}/libluv.dylib"
++ optional doCheck "-DBUSTED_PRG=${neovimLuaEnv}/bin/busted"
++ optional (!lua.pkgs.isLuaJIT) "-DPREFER_LUA=ON"
;