about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorMatthieu Coudron <teto@users.noreply.github.com>2022-03-31 16:12:07 +0200
committerGitHub <noreply@github.com>2022-03-31 16:12:07 +0200
commite98e3a2365fc30eb8a7cdbda726e304451843097 (patch)
treef9b0e24f5758b979c243737c57487ad8f9a80044 /pkgs/applications
parent17e5adac26ece37d8b91d2c39f3f4f99195af34a (diff)
parenteb5409461a41f5e3d78997d870f38a6329bb8044 (diff)
downloadnixlib-e98e3a2365fc30eb8a7cdbda726e304451843097.tar
nixlib-e98e3a2365fc30eb8a7cdbda726e304451843097.tar.gz
nixlib-e98e3a2365fc30eb8a7cdbda726e304451843097.tar.bz2
nixlib-e98e3a2365fc30eb8a7cdbda726e304451843097.tar.lz
nixlib-e98e3a2365fc30eb8a7cdbda726e304451843097.tar.xz
nixlib-e98e3a2365fc30eb8a7cdbda726e304451843097.tar.zst
nixlib-e98e3a2365fc30eb8a7cdbda726e304451843097.zip
Merge pull request #166162 from teto/lua-checks-pr
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/editors/neovim/default.nix31
1 files changed, 11 insertions, 20 deletions
diff --git a/pkgs/applications/editors/neovim/default.nix b/pkgs/applications/editors/neovim/default.nix
index 03cc0b35b8d3..e06096933c97 100644
--- a/pkgs/applications/editors/neovim/default.nix
+++ b/pkgs/applications/editors/neovim/default.nix
@@ -5,7 +5,8 @@
 , tree-sitter
 , glibcLocales ? null, procps ? null
 
-# now defaults to false because some tests can be flaky (clipboard etc)
+# now defaults to false because some tests can be flaky (clipboard etc), see
+# also: https://github.com/neovim/neovim/issues/16233
 , doCheck ? false
 , nodejs ? null, fish ? null, python3 ? null
 }:
@@ -21,14 +22,6 @@ let
     ));
 
   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
   stdenv.mkDerivation rec {
     pname = "neovim-unwrapped";
@@ -57,7 +50,11 @@ in
       libtermkey
       libuv
       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
       ncurses
       neovimLuaEnv
@@ -97,12 +94,12 @@ in
     disallowedReferences = [ stdenv.cc ];
 
     cmakeFlags = [
-      "-DGPERF_PRG=${gperf}/bin/gperf"
-      "-DLUA_PRG=${neovimLuaEnv.interpreter}"
-      "-DLIBLUV_LIBRARY=${luvpath}"
+      # Don't use downloaded dependencies. At the end of the configurePhase one
+      # can spot that cmake says this option was "not used by the project".
+      # That's because all dependencies were found and
+      # third-party/CMakeLists.txt is not read at all.
       "-DUSE_BUNDLED=OFF"
     ]
-    ++ optional doCheck "-DBUSTED_PRG=${neovimLuaEnv}/bin/busted"
     ++ optional (!lua.pkgs.isLuaJIT) "-DPREFER_LUA=ON"
     ;
 
@@ -113,12 +110,6 @@ in
       substituteInPlace src/nvim/CMakeLists.txt --replace "    util" ""
     '';
 
-    # For treesitter plugins, libstdc++.so.6, or equivalent will be needed
-    NIX_LDFLAGS =
-      lib.optionals stdenv.cc.isGNU [ "-lstdc++"]
-      ++ lib.optionals stdenv.cc.isClang [ "-lc++" ];
-
-    # export PATH=$PWD/build/bin:${PATH}
     shellHook=''
       export VIMRUNTIME=$PWD/runtime
     '';