summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/editors/neovim
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2024-07-01 01:07:02 +0200
committerMartin Weinelt <hexa@darmstadt.ccc.de>2024-07-01 01:07:21 +0200
commit9b79a05ae1311685f77dafbdfc88e81e390b22f1 (patch)
tree73301ee669f664cc6fbbc1a498b08d65d5556878 /pkgs/applications/editors/neovim
parent3bb3e89f3b053d085ab876d9f06c34386fd6f71c (diff)
parentb2e0a5c33ce0db07af94a7f9cfd50612dd4bdcda (diff)
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts: - pkgs/development/python-modules/flexcache/default.nix - pkgs/development/python-modules/flexparser/default.nix - pkgs/development/python-modules/odp-amsterdam/default.nix - pkgs/development/python-modules/pint/default.nix - pkgs/development/python-modules/uncertainties/default.nix - pkgs/top-level/python-packages.nix
Diffstat (limited to 'pkgs/applications/editors/neovim')
-rw-r--r--pkgs/applications/editors/neovim/neovim-gtk.nix40
-rw-r--r--pkgs/applications/editors/neovim/neovim-remote.nix52
-rw-r--r--pkgs/applications/editors/neovim/utils.nix30
3 files changed, 23 insertions, 99 deletions
diff --git a/pkgs/applications/editors/neovim/neovim-gtk.nix b/pkgs/applications/editors/neovim/neovim-gtk.nix
deleted file mode 100644
index eebb980f85cb..000000000000
--- a/pkgs/applications/editors/neovim/neovim-gtk.nix
+++ /dev/null
@@ -1,40 +0,0 @@
-{ lib
-, rustPlatform
-, fetchFromGitHub
-, wrapGAppsHook4
-, pkg-config
-, gdk-pixbuf
-, gtk4
-, pango
-, vte-gtk4
-}:
-
-rustPlatform.buildRustPackage rec {
- pname = "neovim-gtk";
- version = "1.0.4";
-
- src = fetchFromGitHub {
- owner = "Lyude";
- repo = pname;
- rev = "v${version}";
- hash = "sha256-inva7pYwOw3bXvFeKZ4aKSQ65iCat5HxM+NME8jN4/I=";
- };
-
- cargoHash = "sha256-9eZwCOP4xQtFOieqVRBAdXZrXmzdnae6PexGJ/eCyYc=";
-
- nativeBuildInputs = [ wrapGAppsHook4 pkg-config ];
-
- buildInputs = [ gdk-pixbuf gtk4 pango vte-gtk4 ];
-
- postInstall = ''
- make PREFIX=$out install-resources
- '';
-
- meta = with lib; {
- description = "Gtk ui for neovim";
- homepage = "https://github.com/Lyude/neovim-gtk";
- license = licenses.gpl3Only;
- maintainers = with maintainers; [ aleksana ];
- mainProgram = "nvim-gtk";
- };
-}
diff --git a/pkgs/applications/editors/neovim/neovim-remote.nix b/pkgs/applications/editors/neovim/neovim-remote.nix
deleted file mode 100644
index f85d379faa85..000000000000
--- a/pkgs/applications/editors/neovim/neovim-remote.nix
+++ /dev/null
@@ -1,52 +0,0 @@
-{ lib
-, fetchFromGitHub
-, python3
-, neovim
-, fetchpatch
-}:
-
-with python3.pkgs; buildPythonApplication rec {
- pname = "neovim-remote";
- version = "2.5.1";
-
- src = fetchFromGitHub {
- owner = "mhinz";
- repo = "neovim-remote";
- rev = "v${version}";
- sha256 = "0lbz4w8hgxsw4k1pxafrl3rhydrvi5jc6vnsmkvnhh6l6rxlmvmq";
- };
-
- patches = [
- # Fix a compatibility issue with neovim 0.8.0
- (fetchpatch {
- url = "https://github.com/mhinz/neovim-remote/commit/56d2a4097f4b639a16902390d9bdd8d1350f948c.patch";
- hash = "sha256-/PjE+9yfHtOUEp3xBaobzRM8Eo2wqOhnF1Es7SIdxvM=";
- })
- ];
-
- propagatedBuildInputs = [
- pynvim
- psutil
- setuptools
- ];
-
- nativeCheckInputs = [
- neovim
- pytestCheckHook
- ];
-
- doCheck = !stdenv.isDarwin;
-
- preCheck = ''
- export HOME="$(mktemp -d)"
- '';
-
- meta = with lib; {
- description = "Tool that helps controlling nvim processes from a terminal";
- homepage = "https://github.com/mhinz/neovim-remote/";
- license = licenses.mit;
- maintainers = with maintainers; [ edanaher ];
- platforms = platforms.unix;
- mainProgram = "nvr";
- };
-}
diff --git a/pkgs/applications/editors/neovim/utils.nix b/pkgs/applications/editors/neovim/utils.nix
index 902d62d9486a..9f0aa86de48c 100644
--- a/pkgs/applications/editors/neovim/utils.nix
+++ b/pkgs/applications/editors/neovim/utils.nix
@@ -7,7 +7,6 @@
, ruby
, lua
, python3Packages
-, writeText
, wrapNeovimUnstable
, runCommand
}:
@@ -78,7 +77,7 @@ let
++ (extraPython3Packages ps)
++ (lib.concatMap (f: f ps) pluginPython3Packages));
- luaEnv = neovim-unwrapped.lua.withPackages(extraLuaPackages);
+ luaEnv = neovim-unwrapped.lua.withPackages extraLuaPackages;
# as expected by packdir
packpathDirs.myNeovimPackages = myVimPackage;
@@ -101,13 +100,13 @@ let
"--prefix" "LUA_CPATH" ";" (neovim-unwrapped.lua.pkgs.luaLib.genLuaCPathAbsStr luaEnv)
];
- manifestRc = vimUtils.vimrcContent ({ customRC = ""; }) ;
+ manifestRc = vimUtils.vimrcContent { customRC = ""; };
# we call vimrcContent without 'packages' to avoid the init.vim generation
- neovimRcContent = vimUtils.vimrcContent ({
+ neovimRcContent = vimUtils.vimrcContent {
beforePlugins = "";
customRC = lib.concatStringsSep "\n" (pluginRC ++ [customRC]);
packages = null;
- });
+ };
in
builtins.removeAttrs args ["plugins"] // {
@@ -225,8 +224,25 @@ let
} // grammar.meta;
}
''
- mkdir -p $out/parser
- ln -s ${grammar}/parser $out/parser/${name}.so
+ mkdir -p "$out/parser"
+ ln -s "${grammar}/parser" "$out/parser/${name}.so"
+
+ mkdir -p "$out/queries/${name}"
+ if [ -d "${grammar}/queries/${name}" ]; then
+ echo "moving queries from neovim queries dir"
+ for file in "${grammar}/queries/${name}"*; do
+ ln -s "$file" "$out/queries/${name}/$(basename "$file")"
+ done
+ else
+ if [ -d "${grammar}/queries" ]; then
+ echo "moving queries from standard queries dir"
+ for file in "${grammar}/queries/"*; do
+ ln -s "$file" "$out/queries/${name}/$(basename "$file")"
+ done
+ else
+ echo "missing queries for ${name}"
+ fi
+ fi
'');
/*