diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/editors/neovim/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/editors/neovim/default.nix | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/applications/editors/neovim/default.nix b/nixpkgs/pkgs/applications/editors/neovim/default.nix index 475330a5fe5..b546aae790a 100644 --- a/nixpkgs/pkgs/applications/editors/neovim/default.nix +++ b/nixpkgs/pkgs/applications/editors/neovim/default.nix @@ -6,6 +6,7 @@ # now defaults to false because some tests can be flaky (clipboard etc) , doCheck ? false +, nodejs ? null, fish ? null, python ? null }: with stdenv.lib; @@ -17,16 +18,26 @@ let nvim-client luv coxpcall busted luafilesystem penlight inspect ] )); + + 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"; - version = "0.4.3"; + version = "0.4.4"; src = fetchFromGitHub { owner = "neovim"; repo = "neovim"; rev = "v${version}"; - sha256 = "03p7pic7hw9yxxv7fbgls1f42apx3lik2k6mpaz1a109ngyc5kaj"; + sha256 = "11zyj6jvkwas3n6w1ckj3pk6jf81z1g7ngg4smmwm7c27y2a6f2m"; }; patches = [ @@ -44,7 +55,7 @@ in libtermkey libuv libvterm-neovim - lua.pkgs.luv.libluv + luv.libluv msgpack ncurses neovimLuaEnv @@ -67,6 +78,13 @@ in pkgconfig ]; + # extra programs test via `make functionaltest` + checkInputs = [ + fish + nodejs + pyEnv # for src/clint.py + ]; + # nvim --version output retains compilation flags and references to build tools postPatch = '' @@ -78,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" ; |