From a034898ee12639b64b8918d537e66ed8954c7aa4 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Tue, 8 Oct 2024 15:50:20 -0500 Subject: [PATCH 1/7] vimPlugins/overrides: format --- .../editors/vim/plugins/overrides.nix | 925 +++++++++++------- 1 file changed, 574 insertions(+), 351 deletions(-) diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index a65e920150fb..2ec6302fbfd2 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -1,139 +1,140 @@ -{ lib -, stdenv -, # nixpkgs functions - buildGoModule -, buildVimPlugin -, fetchFromGitHub -, fetchFromSourcehut -, fetchpatch -, fetchurl -, neovimUtils -, substituteAll -, # Language dependencies - fetchYarnDeps -, mkYarnModules -, python3 -, rustPlatform -, # Misc dependencies - arrow-cpp -, Cocoa -, coc-clangd -, coc-diagnostic -, coc-pyright -, code-minimap -, dasht -, deno -, direnv -, duckdb -, fish -, fzf -, gawk -, git -, himalaya -, htop -, jq -, khard -, languagetool -, llvmPackages -, meson -, neovim-unwrapped -, nim1 -, nodePackages -, openscad -, pandoc -, parinfer-rust -, phpactor -, ranger -, ripgrep -, skim -, sqlite -, statix -, stylish-haskell -, tabnine -, taskwarrior2 -, taskwarrior3 -, tmux -, tup -, vim -, which -, xkb-switch -, ycmd -, zoxide -, nodejs -, xdotool -, xorg -, xxd -, zathura -, zenity -, zsh -, # codeium-nvim dependencies - codeium -, # codesnap-nvim dependencies - clang -, libuv -, # command-t dependencies - getconf -, ruby -, # cornelis dependencies - cornelis -, # cpsm dependencies - boost -, cmake -, icu -, ncurses -, # LanguageClient-neovim dependencies - CoreFoundation -, CoreServices -, # nvim-treesitter dependencies - callPackage -, # Preview-nvim dependencies - md-tui -, # sg.nvim dependencies - darwin -, # sved dependencies - glib -, gobject-introspection -, wrapGAppsHook3 -, writeText -, # sniprun dependencies - bashInteractive -, coreutils -, curl -, gnugrep -, gnused -, makeWrapper -, procps -, # sg-nvim dependencies - openssl -, pkg-config -, # vim-agda dependencies - agda -, # vim-go dependencies - asmfmt -, delve -, errcheck -, go-motion -, go-tools -, gocode-gomod -, godef -, gogetdoc -, golangci-lint -, golint -, gomodifytags -, gopls -, gotags -, gotools -, iferr -, impl -, reftools -, revive -, # hurl dependencies - hurl -, # must be lua51Packages - luajitPackages -, aider-chat -, -}: self: super: +{ + lib, + stdenv, + # nixpkgs functions + buildGoModule, + buildVimPlugin, + fetchFromGitHub, + fetchFromSourcehut, + fetchpatch, + fetchurl, + neovimUtils, + substituteAll, + # Language dependencies + fetchYarnDeps, + mkYarnModules, + python3, + rustPlatform, + # Misc dependencies + arrow-cpp, + Cocoa, + coc-clangd, + coc-diagnostic, + coc-pyright, + code-minimap, + dasht, + deno, + direnv, + duckdb, + fish, + fzf, + gawk, + git, + himalaya, + htop, + jq, + khard, + languagetool, + llvmPackages, + meson, + neovim-unwrapped, + nim1, + nodePackages, + openscad, + pandoc, + parinfer-rust, + phpactor, + ranger, + ripgrep, + skim, + sqlite, + statix, + stylish-haskell, + tabnine, + taskwarrior2, + taskwarrior3, + tmux, + tup, + vim, + which, + xkb-switch, + ycmd, + zoxide, + nodejs, + xdotool, + xorg, + xxd, + zathura, + zenity, + zsh, + # codeium-nvim dependencies + codeium, + # codesnap-nvim dependencies + clang, + libuv, + # command-t dependencies + getconf, + ruby, + # cornelis dependencies + cornelis, + # cpsm dependencies + boost, + cmake, + icu, + ncurses, + # LanguageClient-neovim dependencies + CoreFoundation, + CoreServices, + # nvim-treesitter dependencies + callPackage, + # Preview-nvim dependencies + md-tui, + # sg.nvim dependencies + darwin, + # sved dependencies + glib, + gobject-introspection, + wrapGAppsHook3, + writeText, + # sniprun dependencies + bashInteractive, + coreutils, + curl, + gnugrep, + gnused, + makeWrapper, + procps, + # sg-nvim dependencies + openssl, + pkg-config, + # vim-agda dependencies + agda, + # vim-go dependencies + asmfmt, + delve, + errcheck, + go-motion, + go-tools, + gocode-gomod, + godef, + gogetdoc, + golangci-lint, + golint, + gomodifytags, + gopls, + gotags, + gotools, + iferr, + impl, + reftools, + revive, + # hurl dependencies + hurl, + # must be lua51Packages + luajitPackages, + aider-chat, +}: +self: super: let luaPackages = neovim-unwrapped.lua.pkgs; in @@ -143,7 +144,11 @@ in }; advanced-git-search-nvim = super.advanced-git-search-nvim.overrideAttrs { - dependencies = with super; [ telescope-nvim vim-fugitive vim-rhubarb ]; + dependencies = with super; [ + telescope-nvim + vim-fugitive + vim-rhubarb + ]; }; animation-nvim = super.animation-nvim.overrideAttrs { @@ -165,7 +170,10 @@ in }; barbecue-nvim = super.barbecue-nvim.overrideAttrs { - dependencies = with self; [ nvim-lspconfig nvim-navic ]; + dependencies = with self; [ + nvim-lspconfig + nvim-navic + ]; meta = { description = "VS Code like winbar for Neovim"; homepage = "https://github.com/utilyre/barbecue.nvim"; @@ -201,8 +209,8 @@ in }; chadtree = super.chadtree.overrideAttrs { - passthru.python3Dependencies = ps: - with ps; [ + passthru.python3Dependencies = + ps: with ps; [ pynvim-pp pyyaml std2 @@ -213,7 +221,11 @@ in }; ChatGPT-nvim = super.ChatGPT-nvim.overrideAttrs { - dependencies = with self; [ nui-nvim plenary-nvim telescope-nvim ]; + dependencies = with self; [ + nui-nvim + plenary-nvim + telescope-nvim + ]; }; clang_complete = super.clang_complete.overrideAttrs { @@ -227,7 +239,8 @@ in substituteInPlace "$out"/plugin/clang_complete.vim \ --replace "let g:clang_library_path = '' + "''" - + '' " "let g:clang_library_path='${llvmPackages.libclang.lib}/lib/libclang.so'" + + '' + " "let g:clang_library_path='${llvmPackages.libclang.lib}/lib/libclang.so'" substituteInPlace "$out"/plugin/libclang.py \ --replace "/usr/lib/clang" "${llvmPackages.clang.cc}/lib/clang" @@ -252,15 +265,24 @@ in }; cmp-ai = super.cmp-ai.overrideAttrs { - dependencies = with self; [ nvim-cmp plenary-nvim ]; + dependencies = with self; [ + nvim-cmp + plenary-nvim + ]; }; cmp-clippy = super.cmp-clippy.overrideAttrs { - dependencies = with self; [ nvim-cmp plenary-nvim ]; + dependencies = with self; [ + nvim-cmp + plenary-nvim + ]; }; cmp-copilot = super.cmp-copilot.overrideAttrs { - dependencies = with self; [ nvim-cmp copilot-vim ]; + dependencies = with self; [ + nvim-cmp + copilot-vim + ]; }; cmp-ctags = super.cmp-ctags.overrideAttrs { @@ -268,7 +290,10 @@ in }; cmp-dap = super.cmp-dap.overrideAttrs { - dependencies = with self; [ nvim-cmp nvim-dap ]; + dependencies = with self; [ + nvim-cmp + nvim-dap + ]; }; cmp-dictionary = super.cmp-dictionary.overrideAttrs { @@ -284,15 +309,24 @@ in }; cmp-fuzzy-buffer = super.cmp-fuzzy-buffer.overrideAttrs { - dependencies = with self; [ nvim-cmp fuzzy-nvim ]; + dependencies = with self; [ + nvim-cmp + fuzzy-nvim + ]; }; cmp-fuzzy-path = super.cmp-fuzzy-path.overrideAttrs { - dependencies = with self; [ nvim-cmp fuzzy-nvim ]; + dependencies = with self; [ + nvim-cmp + fuzzy-nvim + ]; }; cmp-git = super.cmp-git.overrideAttrs { - dependencies = with self; [ nvim-cmp plenary-nvim ]; + dependencies = with self; [ + nvim-cmp + plenary-nvim + ]; }; cmp-greek = super.cmp-greek.overrideAttrs { @@ -304,11 +338,17 @@ in }; cmp-neosnippet = super.cmp-neosnippet.overrideAttrs { - dependencies = with self; [ nvim-cmp neosnippet-vim ]; + dependencies = with self; [ + nvim-cmp + neosnippet-vim + ]; }; cmp-npm = super.cmp-npm.overrideAttrs { - dependencies = with self; [ nvim-cmp plenary-nvim ]; + dependencies = with self; [ + nvim-cmp + plenary-nvim + ]; }; cmp-nvim-lsp-signature-help = super.cmp-nvim-lsp-signature-help.overrideAttrs { @@ -320,7 +360,10 @@ in }; cmp-pandoc-nvim = super.cmp-pandoc-nvim.overrideAttrs { - dependencies = with self; [ nvim-cmp plenary-nvim ]; + dependencies = with self; [ + nvim-cmp + plenary-nvim + ]; }; cmp-rg = super.cmp-rg.overrideAttrs { @@ -328,7 +371,10 @@ in }; cmp-snippy = super.cmp-snippy.overrideAttrs { - dependencies = with self; [ nvim-cmp nvim-snippy ]; + dependencies = with self; [ + nvim-cmp + nvim-snippy + ]; }; cmp-tabby = super.cmp-tabby.overrideAttrs { @@ -345,19 +391,31 @@ in }; cmp-tmux = super.cmp-tmux.overrideAttrs { - dependencies = with self; [ nvim-cmp tmux ]; + dependencies = with self; [ + nvim-cmp + tmux + ]; }; cmp-vim-lsp = super.cmp-vim-lsp.overrideAttrs { - dependencies = with self; [ nvim-cmp vim-lsp ]; + dependencies = with self; [ + nvim-cmp + vim-lsp + ]; }; cmp-vimwiki-tags = super.cmp-vimwiki-tags.overrideAttrs { - dependencies = with self; [ nvim-cmp vimwiki ]; + dependencies = with self; [ + nvim-cmp + vimwiki + ]; }; cmp-zsh = super.cmp-zsh.overrideAttrs { - dependencies = with self; [ nvim-cmp zsh ]; + dependencies = with self; [ + nvim-cmp + zsh + ]; }; coc-clangd = buildVimPlugin { @@ -382,79 +440,88 @@ in src = "${nodePackages."@yaegassy/coc-nginx"}/lib/node_modules/@yaegassy/coc-nginx"; }; - codeium-nvim = let - # Update according to https://github.com/Exafunction/codeium.nvim/blob/main/lua/codeium/versions.json - codeiumVersion = "1.20.9"; - codeiumHashes = { - x86_64-linux = "sha256-IeNK7UQtOhqC/eQv7MAya4jB1WIGykSR7IgutZatmHM="; - aarch64-linux = "sha256-ujTFki/3V79El2WCkG0PJhbaMT0knC9mrS9E7Uv9HD4="; - x86_64-darwin = "sha256-r2KloEQsUku9sk8h76kwyQuMTHcq/vwfTSK2dkiXDzE="; - aarch64-darwin = "sha256-1jNH0Up8mAahDgvPF6g42LV+RVDVsPqDM54lE2KYY48="; - }; - - codeium' = codeium.overrideAttrs rec { - version = codeiumVersion; - - src = let - inherit (stdenv.hostPlatform) system; - throwSystem = throw "Unsupported system: ${system}"; - - platform = { - x86_64-linux = "linux_x64"; - aarch64-linux = "linux_arm"; - x86_64-darwin = "macos_x64"; - aarch64-darwin = "macos_arm"; - }.${system} or throwSystem; - - hash = codeiumHashes.${system} or throwSystem; - in fetchurl { - name = "codeium-${version}.gz"; - url = "https://github.com/Exafunction/codeium/releases/download/language-server-v${version}/language_server_${platform}.gz"; - inherit hash; + codeium-nvim = + let + # Update according to https://github.com/Exafunction/codeium.nvim/blob/main/lua/codeium/versions.json + codeiumVersion = "1.20.9"; + codeiumHashes = { + x86_64-linux = "sha256-IeNK7UQtOhqC/eQv7MAya4jB1WIGykSR7IgutZatmHM="; + aarch64-linux = "sha256-ujTFki/3V79El2WCkG0PJhbaMT0knC9mrS9E7Uv9HD4="; + x86_64-darwin = "sha256-r2KloEQsUku9sk8h76kwyQuMTHcq/vwfTSK2dkiXDzE="; + aarch64-darwin = "sha256-1jNH0Up8mAahDgvPF6g42LV+RVDVsPqDM54lE2KYY48="; }; - }; - in super.codeium-nvim.overrideAttrs { - dependencies = with self; [ nvim-cmp plenary-nvim ]; - buildPhase = '' - cat << EOF > lua/codeium/installation_defaults.lua - return { - tools = { - language_server = "${codeium'}/bin/codeium_language_server" + codeium' = codeium.overrideAttrs rec { + version = codeiumVersion; + + src = + let + inherit (stdenv.hostPlatform) system; + throwSystem = throw "Unsupported system: ${system}"; + + platform = + { + x86_64-linux = "linux_x64"; + aarch64-linux = "linux_arm"; + x86_64-darwin = "macos_x64"; + aarch64-darwin = "macos_arm"; + } + .${system} or throwSystem; + + hash = codeiumHashes.${system} or throwSystem; + in + fetchurl { + name = "codeium-${version}.gz"; + url = "https://github.com/Exafunction/codeium/releases/download/language-server-v${version}/language_server_${platform}.gz"; + inherit hash; + }; + }; + + in + super.codeium-nvim.overrideAttrs { + dependencies = with self; [ + nvim-cmp + plenary-nvim + ]; + buildPhase = '' + cat << EOF > lua/codeium/installation_defaults.lua + return { + tools = { + language_server = "${codeium'}/bin/codeium_language_server" + }; }; - }; - EOF - ''; + EOF + ''; - doCheck = true; - checkInputs = [ jq ]; - checkPhase = '' - runHook preCheck + doCheck = true; + checkInputs = [ jq ]; + checkPhase = '' + runHook preCheck - expected_codeium_version=$(jq -r '.version' lua/codeium/versions.json) - actual_codeium_version=$(${codeium'}/bin/codeium_language_server --version) + expected_codeium_version=$(jq -r '.version' lua/codeium/versions.json) + actual_codeium_version=$(${codeium'}/bin/codeium_language_server --version) - expected_codeium_stamp=$(jq -r '.stamp' lua/codeium/versions.json) - actual_codeium_stamp=$(${codeium'}/bin/codeium_language_server --stamp | grep STABLE_BUILD_SCM_REVISION | cut -d' ' -f2) + expected_codeium_stamp=$(jq -r '.stamp' lua/codeium/versions.json) + actual_codeium_stamp=$(${codeium'}/bin/codeium_language_server --stamp | grep STABLE_BUILD_SCM_REVISION | cut -d' ' -f2) - if [ "$actual_codeium_stamp" != "$expected_codeium_stamp" ]; then - echo " - The version of codeium patched in vimPlugins.codeium-nvim is incorrect. - Expected stamp: $expected_codeium_stamp - Actual stamp: $actual_codeium_stamp + if [ "$actual_codeium_stamp" != "$expected_codeium_stamp" ]; then + echo " + The version of codeium patched in vimPlugins.codeium-nvim is incorrect. + Expected stamp: $expected_codeium_stamp + Actual stamp: $actual_codeium_stamp - Expected codeium version: $expected_codeium_version - Actual codeium version: $actual_codeium_version + Expected codeium version: $expected_codeium_version + Actual codeium version: $actual_codeium_version - Please, update 'codeiumVersion' in pkgs/applications/editors/vim/plugins/overrides.nix accordingly to: - https://github.com/Exafunction/codeium.nvim/blob/main/lua/codeium/versions.json - " - exit 1 - fi + Please, update 'codeiumVersion' in pkgs/applications/editors/vim/plugins/overrides.nix accordingly to: + https://github.com/Exafunction/codeium.nvim/blob/main/lua/codeium/versions.json + " + exit 1 + fi - runHook postCheck - ''; - }; + runHook postCheck + ''; + }; codesnap-nvim = let @@ -478,11 +545,13 @@ in rustPlatform.bindgenHook ]; - buildInputs = [ - libuv.dev - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.apple_sdk.frameworks.AppKit - ]; + buildInputs = + [ + libuv.dev + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + darwin.apple_sdk.frameworks.AppKit + ]; }; in buildVimPlugin { @@ -493,12 +562,14 @@ in # - Copy the resulting binary from the codesnap-lib derivation # Note: the destination should be generator.so, even on darwin # https://github.com/mistricky/codesnap.nvim/blob/main/scripts/build_generator.sh - postInstall = let - extension = if stdenv.hostPlatform.isDarwin then "dylib" else "so"; - in '' - rm -r $out/lua/*.so - cp ${codesnap-lib}/lib/libgenerator.${extension} $out/lua/generator.so - ''; + postInstall = + let + extension = if stdenv.hostPlatform.isDarwin then "dylib" else "so"; + in + '' + rm -r $out/lua/*.so + cp ${codesnap-lib}/lib/libgenerator.${extension} $out/lua/generator.so + ''; doInstallCheck = true; nvimRequireCheck = "codesnap"; @@ -510,7 +581,10 @@ in }; command-t = super.command-t.overrideAttrs { - nativeBuildInputs = [ getconf ruby ]; + nativeBuildInputs = [ + getconf + ruby + ]; buildPhase = '' substituteInPlace lua/wincent/commandt/lib/Makefile \ --replace '/bin/bash' 'bash' \ @@ -559,15 +633,24 @@ in }; completion-treesitter = super.completion-treesitter.overrideAttrs { - dependencies = with self; [ completion-nvim nvim-treesitter ]; + dependencies = with self; [ + completion-nvim + nvim-treesitter + ]; }; CopilotChat-nvim = super.CopilotChat-nvim.overrideAttrs { - dependencies = with self; [ copilot-lua plenary-nvim ]; + dependencies = with self; [ + copilot-lua + plenary-nvim + ]; }; copilot-lualine = super.copilot-lualine.overrideAttrs { - dependencies = with self; [ copilot-lua lualine-nvim ]; + dependencies = with self; [ + copilot-lua + lualine-nvim + ]; doInstallCheck = true; nvimRequireCheck = "copilot-lualine"; }; @@ -585,8 +668,8 @@ in }); coq_nvim = super.coq_nvim.overrideAttrs { - passthru.python3Dependencies = ps: - with ps; [ + passthru.python3Dependencies = + ps: with ps; [ pynvim-pp pyyaml std2 @@ -612,11 +695,13 @@ in cargoHash = "sha256-M5mTdBACTaUVZhPpMOf1KQ3BcQpEoD2isAKRn+iAWjc="; - installPhase = let - cargoTarget = stdenv.hostPlatform.rust.cargoShortTarget; - in '' - install -D target/${cargoTarget}/release/libcord.${extension} $out/lib/cord.${extension} - ''; + installPhase = + let + cargoTarget = stdenv.hostPlatform.rust.cargoShortTarget; + in + '' + install -D target/${cargoTarget}/release/libcord.${extension} $out/lib/cord.${extension} + ''; }; in buildVimPlugin { @@ -688,7 +773,10 @@ in sha256 = "sha256-yXKCq8sqO0Db/sZREuSeqKwKO71cmTsAvWftoOQehZo="; }) ]; - buildInputs = with python3.pkgs; [ python3 setuptools ]; + buildInputs = with python3.pkgs; [ + python3 + setuptools + ]; buildPhase = '' patchShebangs . ./install.sh @@ -716,7 +804,10 @@ in }; ddc-ui-pum = super.ddc-ui-pum.overrideAttrs { - dependencies = with self; [ ddc-vim pum-vim ]; + dependencies = with self; [ + ddc-vim + pum-vim + ]; }; defx-nvim = super.defx-nvim.overrideAttrs { @@ -731,7 +822,10 @@ in }; deoplete-fish = super.deoplete-fish.overrideAttrs { - dependencies = with self; [ deoplete-nvim vim-fish ]; + dependencies = with self; [ + deoplete-nvim + vim-fish + ]; }; deoplete-go = super.deoplete-go.overrideAttrs { @@ -768,8 +862,7 @@ in direnv-vim = super.direnv-vim.overrideAttrs (old: { preFixup = - old.preFixup - or "" + old.preFixup or "" + '' substituteInPlace $out/autoload/direnv.vim \ --replace "let s:direnv_cmd = get(g:, 'direnv_cmd', 'direnv')" \ @@ -905,7 +998,10 @@ in }; hardhat-nvim = super.hardhat-nvim.overrideAttrs { - dependencies = with self; [ overseer-nvim plenary-nvim ]; + dependencies = with self; [ + overseer-nvim + plenary-nvim + ]; doInstallCheck = true; nvimRequireCheck = "hardhat"; @@ -955,7 +1051,10 @@ in }; idris2-nvim = super.idris2-nvim.overrideAttrs { - dependencies = with self; [ nui-nvim nvim-lspconfig ]; + dependencies = with self; [ + nui-nvim + nvim-lspconfig + ]; doInstallCheck = true; nvimRequireCheck = "idris2"; @@ -1054,11 +1153,17 @@ in }; lean-nvim = super.lean-nvim.overrideAttrs { - dependencies = with self; [ nvim-lspconfig plenary-nvim ]; + dependencies = with self; [ + nvim-lspconfig + plenary-nvim + ]; }; leap-ast-nvim = super.leap-ast-nvim.overrideAttrs { - dependencies = with self; [ leap-nvim nvim-treesitter ]; + dependencies = with self; [ + leap-nvim + nvim-treesitter + ]; }; lens-vim = super.lens-vim.overrideAttrs { @@ -1105,8 +1210,8 @@ in rev = "5d916c39c1852e09fcd39eab174b8e5bbdb25f8f"; sha256 = "10d6dh0czdpgfpzqs5vzxfffkm0460qjzi2mfkacgghqf3iwkbja"; }; - passthru.python3Dependencies = ps: - with ps; [ + passthru.python3Dependencies = + ps: with ps; [ pynvim jupyter-client ueberzug @@ -1152,7 +1257,10 @@ in }; mason-lspconfig-nvim = super.mason-lspconfig-nvim.overrideAttrs { - dependencies = with self; [ mason-nvim nvim-lspconfig ]; + dependencies = with self; [ + mason-nvim + nvim-lspconfig + ]; }; mason-tool-installer-nvim = super.mason-tool-installer-nvim.overrideAttrs { @@ -1194,36 +1302,41 @@ in meta.homepage = "https://github.com/jose-elias-alvarez/minsnip.nvim/"; }; - moveline-nvim = let - version = "2024-07-25"; - src = fetchFromGitHub { - owner = "willothy"; - repo = "moveline.nvim"; - rev = "9f67f4b9e752a87eea8205f0279f261a16c733d8"; - sha256 = "sha256-B4t5+Q4Urx5bGm8glNpYkHhpp/rAhz+lDd2EpWFUYoY="; - }; - moveline-lib = rustPlatform.buildRustPackage { + moveline-nvim = + let + version = "2024-07-25"; + src = fetchFromGitHub { + owner = "willothy"; + repo = "moveline.nvim"; + rev = "9f67f4b9e752a87eea8205f0279f261a16c733d8"; + sha256 = "sha256-B4t5+Q4Urx5bGm8glNpYkHhpp/rAhz+lDd2EpWFUYoY="; + }; + moveline-lib = rustPlatform.buildRustPackage { + inherit src version; + pname = "moveline-lib"; + cargoHash = "sha256-e9QB4Rfm+tFNrLAHN/nYUQ5PiTET8knQQIQkMH3UFkU="; + }; + in + buildVimPlugin { inherit src version; - pname = "moveline-lib"; - cargoHash = "sha256-e9QB4Rfm+tFNrLAHN/nYUQ5PiTET8knQQIQkMH3UFkU="; + pname = "moveline-nvim"; + preInstall = '' + mkdir -p lua + ln -s ${moveline-lib}/lib/libmoveline.so lua/moveline.so + ''; + meta = { + description = "Neovim plugin for moving lines up and down"; + homepage = "https://github.com/willothy/moveline.nvim"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ redxtech ]; + }; }; - in buildVimPlugin { - inherit src version; - pname = "moveline-nvim"; - preInstall = '' - mkdir -p lua - ln -s ${moveline-lib}/lib/libmoveline.so lua/moveline.so - ''; - meta = { - description = "Neovim plugin for moving lines up and down"; - homepage = "https://github.com/willothy/moveline.nvim"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ redxtech ]; - }; - }; multicursors-nvim = super.multicursors-nvim.overrideAttrs { - dependencies = with self; [ nvim-treesitter hydra-nvim ]; + dependencies = with self; [ + nvim-treesitter + hydra-nvim + ]; }; ncm2 = super.ncm2.overrideAttrs { @@ -1231,7 +1344,10 @@ in }; ncm2-jedi = super.ncm2-jedi.overrideAttrs { - dependencies = with self; [ nvim-yarp ncm2 ]; + dependencies = with self; [ + nvim-yarp + ncm2 + ]; passthru.python3Dependencies = ps: with ps; [ jedi ]; }; @@ -1263,7 +1379,10 @@ in }; neotest = super.neotest.overrideAttrs { - dependencies = with self; [ nvim-nio plenary-nvim ]; + dependencies = with self; [ + nvim-nio + plenary-nvim + ]; }; neotest-gradle = super.neotest-gradle.overrideAttrs { @@ -1283,7 +1402,10 @@ in }; neo-tree-nvim = super.neo-tree-nvim.overrideAttrs { - dependencies = with self; [ plenary-nvim nui-nvim ]; + dependencies = with self; [ + plenary-nvim + nui-nvim + ]; }; noice-nvim = super.noice-nvim.overrideAttrs { @@ -1311,7 +1433,10 @@ in }; nvim-dap-ui = super.nvim-dap-ui.overrideAttrs { - dependencies = with self; [ nvim-dap nvim-nio ]; + dependencies = with self; [ + nvim-dap + nvim-nio + ]; doInstallCheck = true; nvimRequireCheck = "dapui"; @@ -1337,45 +1462,54 @@ in }; nvim-navbuddy = super.nvim-navbuddy.overrideAttrs { - dependencies = with self; [ nui-nvim nvim-lspconfig nvim-navic ]; + dependencies = with self; [ + nui-nvim + nvim-lspconfig + nvim-navic + ]; }; vim-mediawiki-editor = super.vim-mediawiki-editor.overrideAttrs { passthru.python3Dependencies = [ python3.pkgs.mwclient ]; }; - nvim-dbee = super.nvim-dbee.overrideAttrs (oa: let - dbee-go = buildGoModule { - name = "nvim-dbee"; - src = "${oa.src}/dbee"; - vendorHash = "sha256-U/3WZJ/+Bm0ghjeNUILsnlZnjIwk3ySaX3Rd4L9Z62A="; - buildInputs = [ - arrow-cpp - duckdb - ]; - }; - in { - dependencies = [ self.nui-nvim ]; + nvim-dbee = super.nvim-dbee.overrideAttrs ( + oa: + let + dbee-go = buildGoModule { + name = "nvim-dbee"; + src = "${oa.src}/dbee"; + vendorHash = "sha256-U/3WZJ/+Bm0ghjeNUILsnlZnjIwk3ySaX3Rd4L9Z62A="; + buildInputs = [ + arrow-cpp + duckdb + ]; + }; + in + { + dependencies = [ self.nui-nvim ]; - # nvim-dbee looks for the go binary in paths returned bu M.dir() and M.bin() defined in lua/dbee/install/init.lua - postPatch = '' - substituteInPlace lua/dbee/install/init.lua \ - --replace-fail 'return vim.fn.stdpath("data") .. "/dbee/bin"' 'return "${dbee-go}/bin"' - ''; - - preFixup = '' - mkdir $target/bin - ln -s ${dbee-go}/bin/dbee $target/bin/dbee + # nvim-dbee looks for the go binary in paths returned bu M.dir() and M.bin() defined in lua/dbee/install/init.lua + postPatch = '' + substituteInPlace lua/dbee/install/init.lua \ + --replace-fail 'return vim.fn.stdpath("data") .. "/dbee/bin"' 'return "${dbee-go}/bin"' ''; - meta.platforms = lib.platforms.linux; - }); + preFixup = '' + mkdir $target/bin + ln -s ${dbee-go}/bin/dbee $target/bin/dbee + ''; + + meta.platforms = lib.platforms.linux; + } + ); nvim-navic = super.nvim-navic.overrideAttrs { - dependencies = [ self.nvim-lspconfig ]; + dependencies = [ self.nvim-lspconfig ]; }; - nvim-spectre = super.nvim-spectre.overrideAttrs (old: + nvim-spectre = super.nvim-spectre.overrideAttrs ( + old: let spectre_oxi = rustPlatform.buildRustPackage { pname = "spectre_oxi"; @@ -1395,12 +1529,12 @@ in }; in { - dependencies = with self; - [ plenary-nvim ]; + dependencies = with self; [ plenary-nvim ]; postInstall = '' ln -s ${spectre_oxi}/lib/libspectre_oxi.* $out/lua/spectre_oxi.so ''; - }); + } + ); nvim-teal-maker = super.nvim-teal-maker.overrideAttrs { postPatch = '' @@ -1424,7 +1558,10 @@ in }; octo-nvim = super.octo-nvim.overrideAttrs { - dependencies = with self; [ telescope-nvim plenary-nvim ]; + dependencies = with self; [ + telescope-nvim + plenary-nvim + ]; }; ollama-nvim = super.ollama-nvim.overrideAttrs { @@ -1438,7 +1575,11 @@ in # The plugin depends on either skim-vim or fzf-vim, but we don't want to force the user so we # avoid choosing one of them and leave it to the user openscad-nvim = super.openscad-nvim.overrideAttrs { - buildInputs = [ zathura htop openscad ]; + buildInputs = [ + zathura + htop + openscad + ]; patches = [ (substituteAll { @@ -1476,7 +1617,12 @@ in inherit parinfer-rust; phpactor = buildVimPlugin { - inherit (phpactor) pname src meta version; + inherit (phpactor) + pname + src + meta + version + ; postPatch = '' substituteInPlace plugin/phpactor.vim \ --replace "g:phpactorpath = expand(':p:h') . '/..'" "g:phpactorpath = '${phpactor}'" @@ -1531,14 +1677,20 @@ in }; refactoring-nvim = super.refactoring-nvim.overrideAttrs { - dependencies = with self; [ nvim-treesitter plenary-nvim ]; + dependencies = with self; [ + nvim-treesitter + plenary-nvim + ]; }; # needs "http" and "json" treesitter grammars too rest-nvim = super.rest-nvim.overrideAttrs { dependencies = with self; [ plenary-nvim - (nvim-treesitter.withPlugins (p: [ p.http p.json ])) + (nvim-treesitter.withPlugins (p: [ + p.http + p.json + ])) ]; }; @@ -1554,7 +1706,8 @@ in rustaceanvim = neovimUtils.buildNeovimPlugin { luaAttr = luaPackages.rustaceanvim; }; - sg-nvim = super.sg-nvim.overrideAttrs (old: + sg-nvim = super.sg-nvim.overrideAttrs ( + old: let sg-nvim-rust = rustPlatform.buildRustPackage { pname = "sg-nvim-rust"; @@ -1589,7 +1742,8 @@ in mkdir -p $out/target/debug ln -s ${sg-nvim-rust}/{bin,lib}/* $out/target/debug ''; - }); + } + ); skim = buildVimPlugin { pname = "skim"; @@ -1602,7 +1756,10 @@ in }; smart-open-nvim = super.smart-open-nvim.overrideAttrs { - dependencies = with self; [ telescope-nvim sqlite-lua ]; + dependencies = with self; [ + telescope-nvim + sqlite-lua + ]; }; sniprun = @@ -1628,7 +1785,16 @@ in postInstall = '' wrapProgram $out/bin/sniprun \ - --prefix PATH ${lib.makeBinPath [bashInteractive coreutils curl gnugrep gnused procps]} + --prefix PATH ${ + lib.makeBinPath [ + bashInteractive + coreutils + curl + gnugrep + gnused + procps + ] + } ''; doCheck = false; @@ -1675,9 +1841,9 @@ in --replace "path = vim.g.sqlite_clib_path" "path = vim.g.sqlite_clib_path or ${lib.escapeShellArg libsqlite}" ''; - passthru = oa.passthru // { - initLua = ''vim.g.sqlite_clib_path = "${sqlite.out}/lib/libsqlite3${stdenv.hostPlatform.extensions.sharedLibrary}"''; - }; + passthru = oa.passthru // { + initLua = ''vim.g.sqlite_clib_path = "${sqlite.out}/lib/libsqlite3${stdenv.hostPlatform.extensions.sharedLibrary}"''; + }; }); ssr = super.ssr-nvim.overrideAttrs { @@ -1716,10 +1882,19 @@ in svedbackend = stdenv.mkDerivation { name = "svedbackend-${super.sved.name}"; inherit (super.sved) src; - nativeBuildInputs = [ wrapGAppsHook3 gobject-introspection ]; + nativeBuildInputs = [ + wrapGAppsHook3 + gobject-introspection + ]; buildInputs = [ glib - (python3.withPackages (ps: with ps; [ pygobject3 pynvim dbus-python ])) + (python3.withPackages ( + ps: with ps; [ + pygobject3 + pynvim + dbus-python + ] + )) ]; preferLocalBuild = true; installPhase = '' @@ -1727,12 +1902,14 @@ in ''; }; # the vim plugin expects evinceSync.py to be a python file, but it is a C wrapper - pythonWrapper = writeText "evinceSync-wrapper.py" /* python */ '' - #!${python3}/bin/python3 - import os - import sys - os.execv("${svedbackend}/bin/evinceSync.py", sys.argv) - ''; + pythonWrapper = + writeText "evinceSync-wrapper.py" # python + '' + #!${python3}/bin/python3 + import os + import sys + os.execv("${svedbackend}/bin/evinceSync.py", sys.argv) + ''; in super.sved.overrideAttrs { preferLocalBuild = true; @@ -1761,11 +1938,17 @@ in }; telescope-cheat-nvim = super.telescope-cheat-nvim.overrideAttrs { - dependencies = with self; [ sqlite-lua telescope-nvim ]; + dependencies = with self; [ + sqlite-lua + telescope-nvim + ]; }; telescope-frecency-nvim = super.telescope-frecency-nvim.overrideAttrs { - dependencies = with self; [ sqlite-lua telescope-nvim ]; + dependencies = with self; [ + sqlite-lua + telescope-nvim + ]; }; telescope-fzf-native-nvim = super.telescope-fzf-native-nvim.overrideAttrs { @@ -1803,7 +1986,11 @@ in }); telescope-media-files-nvim = super.telescope-media-files-nvim.overrideAttrs { - dependencies = with self; [ telescope-nvim popup-nvim plenary-nvim ]; + dependencies = with self; [ + telescope-nvim + popup-nvim + plenary-nvim + ]; }; telescope-nvim = super.telescope-nvim.overrideAttrs { @@ -1861,7 +2048,10 @@ in }; typescript-tools-nvim = super.typescript-tools-nvim.overrideAttrs { - dependencies = with self; [ nvim-lspconfig plenary-nvim ]; + dependencies = with self; [ + nvim-lspconfig + plenary-nvim + ]; }; unicode-vim = @@ -1900,7 +2090,10 @@ in }; vim-addon-actions = super.vim-addon-actions.overrideAttrs { - dependencies = with self; [ vim-addon-mw-utils tlib_vim ]; + dependencies = with self; [ + vim-addon-mw-utils + tlib_vim + ]; }; vim-addon-async = super.vim-addon-async.overrideAttrs { @@ -1924,7 +2117,10 @@ in }; vim-addon-mru = super.vim-addon-mru.overrideAttrs { - dependencies = with self; [ vim-addon-other vim-addon-mw-utils ]; + dependencies = with self; [ + vim-addon-other + vim-addon-mw-utils + ]; }; vim-addon-nix = super.vim-addon-nix.overrideAttrs { @@ -1939,19 +2135,34 @@ in }; vim-addon-sql = super.vim-addon-sql.overrideAttrs { - dependencies = with self; [ vim-addon-completion vim-addon-background-cmd tlib_vim ]; + dependencies = with self; [ + vim-addon-completion + vim-addon-background-cmd + tlib_vim + ]; }; vim-addon-syntax-checker = super.vim-addon-syntax-checker.overrideAttrs { - dependencies = with self; [ vim-addon-mw-utils tlib_vim ]; + dependencies = with self; [ + vim-addon-mw-utils + tlib_vim + ]; }; vim-addon-toggle-buffer = super.vim-addon-toggle-buffer.overrideAttrs { - dependencies = with self; [ vim-addon-mw-utils tlib_vim ]; + dependencies = with self; [ + vim-addon-mw-utils + tlib_vim + ]; }; vim-addon-xdebug = super.vim-addon-xdebug.overrideAttrs { - dependencies = with self; [ webapi-vim vim-addon-mw-utils vim-addon-signs vim-addon-async ]; + dependencies = with self; [ + webapi-vim + vim-addon-mw-utils + vim-addon-signs + vim-addon-async + ]; }; vim-agda = super.vim-agda.overrideAttrs { @@ -2120,7 +2331,10 @@ in }; vim-snipmate = super.vim-snipmate.overrideAttrs { - dependencies = with self; [ vim-addon-mw-utils tlib_vim ]; + dependencies = with self; [ + vim-addon-mw-utils + tlib_vim + ]; }; vim-speeddating = super.vim-speeddating.overrideAttrs { @@ -2129,8 +2343,7 @@ in vim-stylish-haskell = super.vim-stylish-haskell.overrideAttrs (old: { postPatch = - old.postPatch - or "" + old.postPatch or "" + '' substituteInPlace ftplugin/haskell/stylish-haskell.vim --replace \ 'g:stylish_haskell_command = "stylish-haskell"' \ @@ -2250,11 +2463,17 @@ in }; vim-zettel = super.vim-zettel.overrideAttrs { - dependencies = with self; [ vimwiki fzf-vim ]; + dependencies = with self; [ + vimwiki + fzf-vim + ]; }; windows-nvim = super.windows-nvim.overrideAttrs { - dependencies = with self; [ middleclass animation-nvim ]; + dependencies = with self; [ + middleclass + animation-nvim + ]; nvimRequireCheck = "windows"; }; @@ -2284,7 +2503,10 @@ in description = "Code-completion engine for Vim"; homepage = "https://github.com/Valloric/YouCompleteMe"; license = licenses.gpl3; - maintainers = with maintainers; [ marcweber jagajaga ]; + maintainers = with maintainers; [ + marcweber + jagajaga + ]; platforms = platforms.unix; }; }; @@ -2310,7 +2532,7 @@ in stripDebugList = [ "autoload/leaderf/python" ]; }; } - // ( +// ( let nodePackageNames = [ "coc-cmake" @@ -2360,7 +2582,8 @@ in "coc-yaml" "coc-yank" ]; - nodePackage2VimPackage = name: + nodePackage2VimPackage = + name: buildVimPlugin { pname = name; inherit (nodePackages.${name}) version meta; From 556deb0d07247e579a5047f55737570d9d4470e9 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Tue, 8 Oct 2024 16:07:08 -0500 Subject: [PATCH 2/7] vimPlugins/overrides: add nvimRequireChecks --- .../vim/plugins/nvim-treesitter/overrides.nix | 1 + .../editors/vim/plugins/overrides.nix | 157 +++++++++++++++++- 2 files changed, 149 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix b/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix index 137d364e5472..987e1755d3de 100644 --- a/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix @@ -90,4 +90,5 @@ in license = licenses.asl20; maintainers = with maintainers; [ figsoda ]; }; + nvimRequireCheck = "nvim-treesitter"; } diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index 2ec6302fbfd2..e8bacf559230 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -149,6 +149,8 @@ in vim-fugitive vim-rhubarb ]; + # TODO: enable after https://github.com/NixOS/nixpkgs/pull/342240 merged + # nvimRequireCheck = "advanced_git_search.utils"; }; animation-nvim = super.animation-nvim.overrideAttrs { @@ -158,6 +160,7 @@ in autosave-nvim = super.autosave-nvim.overrideAttrs { dependencies = with super; [ plenary-nvim ]; + nvimRequireCheck = "autosave"; }; avante-nvim = (callPackage ./avante-nvim { }).overrideAttrs { @@ -180,6 +183,7 @@ in license = lib.licenses.mit; maintainers = with lib.maintainers; [ lightquantum ]; }; + nvimRequireCheck = "barbecue"; }; # The GitHub repository returns 404, which breaks the update script @@ -226,6 +230,8 @@ in plenary-nvim telescope-nvim ]; + # TODO: enable after https://github.com/NixOS/nixpkgs/pull/342240 merged + # nvimRequireCheck = "chatgpt"; }; clang_complete = super.clang_complete.overrideAttrs { @@ -258,10 +264,12 @@ in postPatch = '' sed -i -e 's/require "health"/vim.health/' lua/clipboard-image/health.lua ''; + nvimRequireCheck = "clipboard-image"; }; cmake-tools-nvim = super.cmake-tools-nvim.overrideAttrs { dependencies = with self; [ plenary-nvim ]; + nvimRequireCheck = "cmake-tools"; }; cmp-ai = super.cmp-ai.overrideAttrs { @@ -269,6 +277,7 @@ in nvim-cmp plenary-nvim ]; + nvimRequireCheck = "cmp_ai"; }; cmp-clippy = super.cmp-clippy.overrideAttrs { @@ -276,6 +285,7 @@ in nvim-cmp plenary-nvim ]; + nvimRequireCheck = "cmp_clippy"; }; cmp-copilot = super.cmp-copilot.overrideAttrs { @@ -283,10 +293,12 @@ in nvim-cmp copilot-vim ]; + nvimRequireCheck = "cmp_copilot"; }; cmp-ctags = super.cmp-ctags.overrideAttrs { dependencies = with self; [ nvim-cmp ]; + nvimRequireCheck = "cmp_ctags"; }; cmp-dap = super.cmp-dap.overrideAttrs { @@ -294,18 +306,22 @@ in nvim-cmp nvim-dap ]; + nvimRequireCheck = "cmp_dap"; }; cmp-dictionary = super.cmp-dictionary.overrideAttrs { dependencies = with self; [ nvim-cmp ]; + nvimRequireCheck = "cmp_dictionary"; }; cmp-digraphs = super.cmp-digraphs.overrideAttrs { dependencies = with self; [ nvim-cmp ]; + nvimRequireCheck = "cmp_digraphs"; }; cmp-fish = super.cmp-fish.overrideAttrs { dependencies = with self; [ nvim-cmp ]; + nvimRequireCheck = "cmp_fish"; }; cmp-fuzzy-buffer = super.cmp-fuzzy-buffer.overrideAttrs { @@ -313,6 +329,7 @@ in nvim-cmp fuzzy-nvim ]; + nvimRequireCheck = "cmp_fuzzy_buffer"; }; cmp-fuzzy-path = super.cmp-fuzzy-path.overrideAttrs { @@ -320,6 +337,7 @@ in nvim-cmp fuzzy-nvim ]; + nvimRequireCheck = "cmp_fuzzy_path"; }; cmp-git = super.cmp-git.overrideAttrs { @@ -327,14 +345,17 @@ in nvim-cmp plenary-nvim ]; + nvimRequireCheck = "cmp_git"; }; cmp-greek = super.cmp-greek.overrideAttrs { dependencies = with self; [ nvim-cmp ]; + nvimRequireCheck = "cmp_greek"; }; cmp-look = super.cmp-look.overrideAttrs { dependencies = with self; [ nvim-cmp ]; + nvimRequireCheck = "cmp_look"; }; cmp-neosnippet = super.cmp-neosnippet.overrideAttrs { @@ -342,6 +363,7 @@ in nvim-cmp neosnippet-vim ]; + nvimRequireCheck = "cmp_neosnippet"; }; cmp-npm = super.cmp-npm.overrideAttrs { @@ -349,14 +371,17 @@ in nvim-cmp plenary-nvim ]; + nvimRequireCheck = "cmp-npm"; }; cmp-nvim-lsp-signature-help = super.cmp-nvim-lsp-signature-help.overrideAttrs { dependencies = with self; [ nvim-cmp ]; + nvimRequireCheck = "cmp_nvim_lsp_signature_help"; }; cmp-nvim-tags = super.cmp-nvim-tags.overrideAttrs { dependencies = with self; [ nvim-cmp ]; + nvimRequireCheck = "cmp_nvim_tags"; }; cmp-pandoc-nvim = super.cmp-pandoc-nvim.overrideAttrs { @@ -364,10 +389,12 @@ in nvim-cmp plenary-nvim ]; + nvimRequireCheck = "cmp_pandoc"; }; cmp-rg = super.cmp-rg.overrideAttrs { dependencies = with self; [ nvim-cmp ]; + nvimRequireCheck = "cmp-rg"; }; cmp-snippy = super.cmp-snippy.overrideAttrs { @@ -375,10 +402,12 @@ in nvim-cmp nvim-snippy ]; + nvimRequireCheck = "cmp_snippy"; }; cmp-tabby = super.cmp-tabby.overrideAttrs { dependencies = with self; [ nvim-cmp ]; + nvimRequireCheck = "cmp_tabby"; }; cmp-tabnine = super.cmp-tabnine.overrideAttrs { @@ -395,6 +424,7 @@ in nvim-cmp tmux ]; + nvimRequireCheck = "cmp_tmux"; }; cmp-vim-lsp = super.cmp-vim-lsp.overrideAttrs { @@ -409,6 +439,7 @@ in nvim-cmp vimwiki ]; + nvimRequireCheck = "cmp_vimwiki_tags"; }; cmp-zsh = super.cmp-zsh.overrideAttrs { @@ -416,6 +447,7 @@ in nvim-cmp zsh ]; + nvimRequireCheck = "cmp_zsh"; }; coc-clangd = buildVimPlugin { @@ -521,6 +553,7 @@ in runHook postCheck ''; + nvimRequireCheck = "codeium"; }; codesnap-nvim = @@ -592,6 +625,7 @@ in make build rm ruby/command-t/ext/command-t/*.o ''; + nvimRequireCheck = "wincent.commandt"; }; competitest-nvim = super.competitest-nvim.overrideAttrs { @@ -612,6 +646,7 @@ in compiler-explorer-nvim = super.compiler-explorer-nvim.overrideAttrs { dependencies = with self; [ plenary-nvim ]; + nvimRequireCheck = "compiler-explorer"; }; compiler-nvim = super.compiler-nvim.overrideAttrs { @@ -621,6 +656,7 @@ in completion-buffers = super.completion-buffers.overrideAttrs { dependencies = with self; [ completion-nvim ]; + nvimRequireCheck = "completion_buffers"; }; completion-tabnine = super.completion-tabnine.overrideAttrs { @@ -644,6 +680,7 @@ in copilot-lua plenary-nvim ]; + nvimRequireCheck = "CopilotChat"; }; copilot-lualine = super.copilot-lualine.overrideAttrs { @@ -677,6 +714,7 @@ in # We need some patches so it stops complaining about not being in a venv patches = [ ./patches/coq_nvim/emulate-venv.patch ]; + nvimRequireCheck = "coq"; }; cord-nvim = @@ -756,6 +794,7 @@ in crates-nvim = super.crates-nvim.overrideAttrs { dependencies = with self; [ plenary-nvim ]; + nvimRequireCheck = "crates"; }; ctrlp-cmatcher = super.ctrlp-cmatcher.overrideAttrs { @@ -789,6 +828,7 @@ in ddc-source-lsp = super.ddc-source-lsp.overrideAttrs { dependencies = with self; [ ddc-vim ]; + nvimRequireCheck = "ddc_source_lsp"; }; ddc-vim = super.ddc-vim.overrideAttrs { @@ -851,6 +891,7 @@ in diagram-nvim = super.diagram-nvim.overrideAttrs { dependencies = with self; [ image-nvim ]; + nvimRequireCheck = "diagram"; }; diffview-nvim = super.diffview-nvim.overrideAttrs { @@ -878,6 +919,7 @@ in executor-nvim = super.executor-nvim.overrideAttrs { dependencies = with self; [ nui-nvim ]; + nvimRequireCheck = "executor"; }; fcitx-vim = super.fcitx-vim.overrideAttrs { @@ -890,6 +932,7 @@ in flit-nvim = super.flit-nvim.overrideAttrs { dependencies = with self; [ leap-nvim ]; + nvimRequireCheck = "flit"; }; forms = super.forms.overrideAttrs { @@ -933,6 +976,7 @@ in fuzzy-nvim = super.fuzzy-nvim.overrideAttrs { dependencies = with self; [ telescope-fzf-native-nvim ]; + nvimRequireCheck = "fuzzy_nvim"; }; fzf-checkout-vim = super.fzf-checkout-vim.overrideAttrs { @@ -960,6 +1004,8 @@ in fzf-lua = super.fzf-lua.overrideAttrs { propagatedBuildInputs = [ fzf ]; + # FIXME: address already in use + # nvimRequireCheck = "fzf-lua"; }; fzf-vim = super.fzf-vim.overrideAttrs { @@ -983,18 +1029,22 @@ in gitlinker-nvim = super.gitlinker-nvim.overrideAttrs { dependencies = with self; [ plenary-nvim ]; + nvimRequireCheck = "gitlinker"; }; gitsigns-nvim = super.gitsigns-nvim.overrideAttrs { dependencies = with self; [ plenary-nvim ]; + nvimRequireCheck = "gitsigns"; }; git-worktree-nvim = super.git-worktree-nvim.overrideAttrs { dependencies = with super; [ plenary-nvim ]; + nvimRequireCheck = "git-worktree"; }; guard-nvim = super.guard-nvim.overrideAttrs { dependencies = with self; [ guard-collection ]; + nvimRequireCheck = "guard"; }; hardhat-nvim = super.hardhat-nvim.overrideAttrs { @@ -1009,26 +1059,34 @@ in harpoon = super.harpoon.overrideAttrs { dependencies = with self; [ plenary-nvim ]; + nvimRequireCheck = "harpoon"; }; harpoon2 = super.harpoon2.overrideAttrs { dependencies = with self; [ plenary-nvim ]; + nvimRequireCheck = "harpoon"; }; haskell-snippets-nvim = super.haskell-snippets-nvim.overrideAttrs { dependencies = [ self.luasnip ]; + nvimRequireCheck = "haskell-snippets"; }; haskell-scope-highlighting-nvim = super.haskell-scope-highlighting-nvim.overrideAttrs { dependencies = with self; [ nvim-treesitter ]; + nvimRequireCheck = "haskell-scope-highlighting"; }; - haskell-tools-nvim = neovimUtils.buildNeovimPlugin { luaAttr = luaPackages.haskell-tools-nvim; }; + haskell-tools-nvim = neovimUtils.buildNeovimPlugin { + luaAttr = luaPackages.haskell-tools-nvim; + nvimRequireCheck = "haskell-tools"; + }; hex-nvim = super.hex-nvim.overrideAttrs { postPatch = '' substituteInPlace lua/hex.lua --replace xxd ${xxd}/bin/xxd ''; + nvimRequireCheck = "hex"; }; himalaya-vim = super.himalaya-vim.overrideAttrs { @@ -1093,6 +1151,7 @@ in jupytext-nvim = super.jupytext-nvim.overrideAttrs { passthru.python3Dependencies = ps: [ ps.jupytext ]; + nvimRequireCheck = "jupytext"; }; kulala-nvim = super.kulala-nvim.overrideAttrs { @@ -1105,6 +1164,7 @@ in substituteInPlace lua/kulala/config/init.lua \ --replace 'curl_path = "curl"' 'curl_path = "${lib.getExe curl}"' ''; + nvimRequireCheck = "kulala"; }; LanguageClient-neovim = @@ -1146,10 +1206,12 @@ in lazy-lsp-nvim = super.lazy-lsp-nvim.overrideAttrs { dependencies = with self; [ nvim-lspconfig ]; + nvimRequireCheck = "lazy-lsp"; }; lazy-nvim = super.lazy-nvim.overrideAttrs { patches = [ ./patches/lazy-nvim/no-helptags.patch ]; + nvimRequireCheck = "lazy"; }; lean-nvim = super.lean-nvim.overrideAttrs { @@ -1157,6 +1219,7 @@ in nvim-lspconfig plenary-nvim ]; + nvimRequireCheck = "lean"; }; leap-ast-nvim = super.leap-ast-nvim.overrideAttrs { @@ -1164,6 +1227,7 @@ in leap-nvim nvim-treesitter ]; + nvimRequireCheck = "leap-ast"; }; lens-vim = super.lens-vim.overrideAttrs { @@ -1184,6 +1248,7 @@ in lir-nvim = super.lir-nvim.overrideAttrs { dependencies = with self; [ plenary-nvim ]; + nvimRequireCheck = "lir"; }; lsp-progress-nvim = neovimUtils.buildNeovimPlugin { @@ -1192,14 +1257,24 @@ in }; luasnip = super.luasnip.overrideAttrs { - dependencies = with self; [ luaPackages.jsregexp ]; + dependencies = [ luaPackages.jsregexp ]; + nvimRequireCheck = "luasnip"; }; - lz-n = neovimUtils.buildNeovimPlugin { luaAttr = luaPackages.lz-n; }; + lz-n = neovimUtils.buildNeovimPlugin { + luaAttr = luaPackages.lz-n; + nvimRequireCheck = "lz.n"; + }; - lze = neovimUtils.buildNeovimPlugin { luaAttr = luaPackages.lze; }; + lze = neovimUtils.buildNeovimPlugin { + luaAttr = luaPackages.lze; + nvimRequireCheck = "lze"; + }; - lzn-auto-require = neovimUtils.buildNeovimPlugin { luaAttr = luaPackages.lzn-auto-require; }; + lzn-auto-require = neovimUtils.buildNeovimPlugin { + luaAttr = luaPackages.lzn-auto-require; + nvimRequireCheck = "lzn-auto-require.loader"; + }; magma-nvim-goose = buildVimPlugin { pname = "magma-nvim-goose"; @@ -1261,10 +1336,12 @@ in mason-nvim nvim-lspconfig ]; + nvimRequireCheck = "mason-lspconfig"; }; mason-tool-installer-nvim = super.mason-tool-installer-nvim.overrideAttrs { dependencies = with self; [ mason-nvim ]; + nvimRequireCheck = "mason-tool-installer"; }; meson = buildVimPlugin { @@ -1330,6 +1407,7 @@ in license = lib.licenses.mit; maintainers = with lib.maintainers; [ redxtech ]; }; + nvimRequireCheck = "moveline"; }; multicursors-nvim = super.multicursors-nvim.overrideAttrs { @@ -1337,10 +1415,12 @@ in nvim-treesitter hydra-nvim ]; + nvimRequireCheck = "multicursors"; }; ncm2 = super.ncm2.overrideAttrs { dependencies = with self; [ nvim-yarp ]; + nvimRequireCheck = "ncm2"; }; ncm2-jedi = super.ncm2-jedi.overrideAttrs { @@ -1369,6 +1449,7 @@ in neogit = super.neogit.overrideAttrs { dependencies = with self; [ plenary-nvim ]; + nvimRequireCheck = "neogit"; }; neorg = neovimUtils.buildNeovimPlugin { @@ -1383,22 +1464,27 @@ in nvim-nio plenary-nvim ]; + nvimRequirecheck = "neotest"; }; neotest-gradle = super.neotest-gradle.overrideAttrs { dependencies = with self; [ plenary-nvim ]; + nvimRequirecheck = "neotest-gradle"; }; neotest-gtest = super.neotest-gtest.overrideAttrs { dependencies = [ self.plenary-nvim ]; + nvimRequirecheck = "neotest-gtest"; }; neotest-playwright = super.neotest-playwright.overrideAttrs { dependencies = [ self.telescope-nvim ]; + nvimRequirecheck = "neotest-playwright"; }; neotest-golang = super.neotest-golang.overrideAttrs { dependencies = [ self.nvim-dap-go ]; + nvimRequirecheck = "neotest-golang"; }; neo-tree-nvim = super.neo-tree-nvim.overrideAttrs { @@ -1406,30 +1492,37 @@ in plenary-nvim nui-nvim ]; + nvimRequirecheck = "neo-tree"; }; noice-nvim = super.noice-nvim.overrideAttrs { dependencies = with self; [ nui-nvim ]; + nvimRequirecheck = "noice"; }; none-ls-nvim = super.none-ls-nvim.overrideAttrs { dependencies = [ self.plenary-nvim ]; + nvimRequireCheck = "null-ls"; }; null-ls-nvim = super.null-ls-nvim.overrideAttrs { dependencies = with self; [ plenary-nvim ]; + nvimRequireCheck = "null-ls"; }; nvim-coverage = super.nvim-coverage.overrideAttrs { dependencies = with self; [ plenary-nvim ]; + nvimRequireCheck = "coverage"; }; nvim-dap-python = super.nvim-dap-python.overrideAttrs { dependencies = with self; [ nvim-dap ]; + nvimRequireCheck = "dap-python"; }; nvim-dap-rego = super.nvim-dap-rego.overrideAttrs { dependencies = with self; [ nvim-dap ]; + nvimRequireCheck = "dap-rego"; }; nvim-dap-ui = super.nvim-dap-ui.overrideAttrs { @@ -1444,6 +1537,7 @@ in nvim-dap-rr = super.nvim-dap-rr.overrideAttrs { dependencies = [ self.nvim-dap ]; + nvimRequireCheck = "nvim-dap-rr"; }; nvim-genghis = super.nvim-genghis.overrideAttrs { @@ -1455,6 +1549,7 @@ in nvim-lsputils = super.nvim-lsputils.overrideAttrs { dependencies = with self; [ popfix ]; + nvimRequireCheck = "lsputil.codeAction"; }; nvim-metals = super.nvim-metals.overrideAttrs { @@ -1467,6 +1562,8 @@ in nvim-lspconfig nvim-navic ]; + # TODO: enable after https://github.com/NixOS/nixpkgs/pull/342240 merged + # nvimRequireCheck = "nvim-navbuddy"; }; vim-mediawiki-editor = super.vim-mediawiki-editor.overrideAttrs { @@ -1501,11 +1598,13 @@ in ''; meta.platforms = lib.platforms.linux; + nvimRequireCheck = "dbee"; } ); nvim-navic = super.nvim-navic.overrideAttrs { dependencies = [ self.nvim-lspconfig ]; + nvimRequireCheck = "nvim-navic"; }; nvim-spectre = super.nvim-spectre.overrideAttrs ( @@ -1533,6 +1632,7 @@ in postInstall = '' ln -s ${spectre_oxi}/lib/libspectre_oxi.* $out/lua/spectre_oxi.so ''; + nvimRequireCheck = "spectre"; } ); @@ -1547,14 +1647,17 @@ in nvim-treesitter = super.nvim-treesitter.overrideAttrs ( callPackage ./nvim-treesitter/overrides.nix { } self super ); + nvim-treesitter-parsers = lib.recurseIntoAttrs self.nvim-treesitter.grammarPlugins; nvim-ufo = super.nvim-ufo.overrideAttrs { dependencies = with self; [ promise-async ]; + nvimRequireCheck = "ufo"; }; obsidian-nvim = super.obsidian-nvim.overrideAttrs { dependencies = with self; [ plenary-nvim ]; + nvimRequireCheck = "obsidian"; }; octo-nvim = super.octo-nvim.overrideAttrs { @@ -1562,10 +1665,12 @@ in telescope-nvim plenary-nvim ]; + nvimRequireCheck = "octo"; }; ollama-nvim = super.ollama-nvim.overrideAttrs { dependencies = [ self.plenary-nvim ]; + nvimRequireCheck = "ollama"; }; onehalf = super.onehalf.overrideAttrs { @@ -1581,6 +1686,8 @@ in openscad ]; + # FIXME: cant find plugin root dir + # nvimRequireCheck = "openscad"; patches = [ (substituteAll { src = ./patches/openscad.nvim/program_paths.patch; @@ -1593,10 +1700,12 @@ in orgmode = super.orgmode.overrideAttrs { dependencies = with self; [ (nvim-treesitter.withPlugins (p: [ p.org ])) ]; + nvimRequireCheck = "orgmode"; }; otter-nvim = super.otter-nvim.overrideAttrs { dependencies = [ self.nvim-lspconfig ]; + nvimRequirecheck = "otter"; }; overseer-nvim = super.overseer-nvim.overrideAttrs { @@ -1612,6 +1721,7 @@ in runHook postCheck ''; + nvimRequireCheck = "overseer"; }; inherit parinfer-rust; @@ -1634,6 +1744,7 @@ in # we need the 'query' grammer to make (nvim-treesitter.withPlugins (p: [ p.query ])) ]; + nvimRequireCheck = "nvim-treesitter-playground"; }; plenary-nvim = super.plenary-nvim.overrideAttrs { @@ -1657,6 +1768,7 @@ in range-highlight-nvim = super.range-highlight-nvim.overrideAttrs { dependencies = with self; [ cmd-parser-nvim ]; + nvimRequireCheck = "range-highlight"; }; ranger-nvim = super.ranger-nvim.overrideAttrs { @@ -1665,6 +1777,7 @@ in postPatch = '' substituteInPlace lua/ranger-nvim.lua --replace '@ranger@' ${ranger}/bin/ranger ''; + nvimRequireCheck = "ranger-nvim"; }; aider-nvim = super.aider-nvim.overrideAttrs { @@ -1674,6 +1787,7 @@ in substituteInPlace lua/aider.lua --replace '@aider@' ${aider-chat}/bin/aider substituteInPlace lua/helpers.lua --replace '@aider@' ${aider-chat}/bin/aider ''; + nvimRequireCheck = "aider"; }; refactoring-nvim = super.refactoring-nvim.overrideAttrs { @@ -1681,6 +1795,7 @@ in nvim-treesitter plenary-nvim ]; + nvimRequireCheck = "refactoring"; }; # needs "http" and "json" treesitter grammars too @@ -1692,19 +1807,33 @@ in p.json ])) ]; + nvimRequireCheck = "rest-nvim"; }; - rocks-nvim = neovimUtils.buildNeovimPlugin { luaAttr = luaPackages.rocks-nvim; }; + rocks-nvim = neovimUtils.buildNeovimPlugin { + luaAttr = luaPackages.rocks-nvim; + nvimRequireCheck = "rocks"; + }; - rocks-config-nvim = neovimUtils.buildNeovimPlugin { luaAttr = luaPackages.rocks-config-nvim; }; + rocks-config-nvim = neovimUtils.buildNeovimPlugin { + luaAttr = luaPackages.rocks-config-nvim; + nvimRequireCheck = "rocks-config"; + }; roslyn-nvim = super.roslyn-nvim.overrideAttrs { dependencies = with self; [ nvim-lspconfig ]; + nvimRequireCheck = "roslyn"; }; - rtp-nvim = neovimUtils.buildNeovimPlugin { luaAttr = luaPackages.rtp-nvim; }; + rtp-nvim = neovimUtils.buildNeovimPlugin { + luaAttr = luaPackages.rtp-nvim; + nvimRequireCheck = "rtp_nvim"; + }; - rustaceanvim = neovimUtils.buildNeovimPlugin { luaAttr = luaPackages.rustaceanvim; }; + rustaceanvim = neovimUtils.buildNeovimPlugin { + luaAttr = luaPackages.rustaceanvim; + nvimRequireCheck = "rustaceanvim"; + }; sg-nvim = super.sg-nvim.overrideAttrs ( old: @@ -1742,6 +1871,7 @@ in mkdir -p $out/target/debug ln -s ${sg-nvim-rust}/{bin,lib}/* $out/target/debug ''; + nvimRequireCheck = "sg"; } ); @@ -1816,6 +1946,7 @@ in changelog = "https://github.com/michaelb/sniprun/blob/v${version}/CHANGELOG.md"; maintainers = with lib.maintainers; [ GaetanLepage ]; }; + nvimRequireCheck = "sniprun"; }; # The GitHub repository returns 404, which breaks the update script @@ -1848,10 +1979,12 @@ in ssr = super.ssr-nvim.overrideAttrs { dependencies = with self; [ nvim-treesitter ]; + nvimRequireCheck = "ssr"; }; startup-nvim = super.startup-nvim.overrideAttrs { dependencies = with super; [ plenary-nvim ]; + nvimRequireCheck = "startup"; }; statix = buildVimPlugin rec { @@ -1874,6 +2007,7 @@ in substituteInPlace lua/stylish/components/menu.lua --replace xdotool ${xdotool}/bin/xdotool substituteInPlace lua/stylish/components/menu.lua --replace xwininfo ${xorg.xwininfo}/bin/xwininfo ''; + nvimRequireCheck = "stylish"; }; sved = @@ -1925,6 +2059,7 @@ in syntax-tree-surfer = super.syntax-tree-surfer.overrideAttrs { dependencies = with self; [ nvim-treesitter ]; meta.maintainers = with lib.maintainers; [ callumio ]; + nvimRequireCheck = "syntax-tree-surfer"; }; taskwarrior3 = buildVimPlugin { @@ -2027,6 +2162,7 @@ in tssorter-nvim = super.tssorter-nvim.overrideAttrs { dependencies = with self; [ nvim-treesitter ]; + nvimRequireCheck = "tssorter"; }; tup = @@ -2052,6 +2188,7 @@ in nvim-lspconfig plenary-nvim ]; + nvimRequireCheck = "typescript-tools"; }; unicode-vim = @@ -2479,6 +2616,7 @@ in wtf-nvim = super.wtf-nvim.overrideAttrs { dependencies = with self; [ nui-nvim ]; + nvimRequireCheck = "wtf"; }; YankRing-vim = super.YankRing-vim.overrideAttrs { @@ -2487,6 +2625,7 @@ in yazi-nvim = super.yazi-nvim.overrideAttrs { dependencies = with self; [ plenary-nvim ]; + nvimRequireCheck = "yazi"; }; YouCompleteMe = super.YouCompleteMe.overrideAttrs { From b84100283f3a307c1cec8e3b02c0995a031032ba Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Tue, 8 Oct 2024 22:47:36 -0500 Subject: [PATCH 3/7] vimPlugins.nvim-metals: add plenary dependency and check --- pkgs/applications/editors/vim/plugins/overrides.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index e8bacf559230..f4fbcf7c9f20 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -1553,7 +1553,9 @@ in }; nvim-metals = super.nvim-metals.overrideAttrs { + dependencies = with self; [ plenary-nvim ]; dontBuild = true; + nvimRequireCheck = "metals"; }; nvim-navbuddy = super.nvim-navbuddy.overrideAttrs { From 2968284179238a2cc93d9d488db0485b473d8813 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Tue, 8 Oct 2024 22:46:46 -0500 Subject: [PATCH 4/7] vimPlugins.elixir-tools-nvim: add plenary dependency and check --- pkgs/applications/editors/vim/plugins/overrides.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index f4fbcf7c9f20..d293c4f6ed68 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -912,9 +912,11 @@ in }); elixir-tools-nvim = super.elixir-tools-nvim.overrideAttrs { + dependencies = with self; [ plenary-nvim ]; fixupPhase = '' patchShebangs $(find $out/bin/ -type f -not -name credo-language-server) ''; + nvimRequireCheck = "elixir"; }; executor-nvim = super.executor-nvim.overrideAttrs { From f1fb7420fba0e10588ef22513cb76c261861f189 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Tue, 8 Oct 2024 22:45:57 -0500 Subject: [PATCH 5/7] vimPlugins.cmp-tabnine: add nvim-cmp dependency and check --- pkgs/applications/editors/vim/plugins/overrides.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index d293c4f6ed68..9a41946b8548 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -412,11 +412,13 @@ in cmp-tabnine = super.cmp-tabnine.overrideAttrs { buildInputs = [ tabnine ]; + dependencies = with self; [ nvim-cmp ]; postFixup = '' mkdir -p $target/binaries/${tabnine.version} ln -s ${tabnine}/bin/ $target/binaries/${tabnine.version}/${tabnine.passthru.platform} ''; + nvimRequireCheck = "cmp_tabnine"; }; cmp-tmux = super.cmp-tmux.overrideAttrs { From 714c7e337a63d45de5117c1f9719cc1b89c32323 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Tue, 8 Oct 2024 22:45:06 -0500 Subject: [PATCH 6/7] vimPlugins.chadtree: add python3 dependency and check --- pkgs/applications/editors/vim/plugins/overrides.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index 9a41946b8548..175969fd573d 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -213,6 +213,9 @@ in }; chadtree = super.chadtree.overrideAttrs { + buildInputs = [ + python3 + ]; passthru.python3Dependencies = ps: with ps; [ pynvim-pp @@ -222,6 +225,7 @@ in # We need some patches so it stops complaining about not being in a venv patches = [ ./patches/chadtree/emulate-venv.patch ]; + nvimRequireCheck = "chadtree"; }; ChatGPT-nvim = super.ChatGPT-nvim.overrideAttrs { From 37d6ced6f9914eb2f344694f19b910ecf71e309c Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Tue, 8 Oct 2024 23:46:53 -0500 Subject: [PATCH 7/7] vimPlugins.moveline-nvim: mark darwin bad platforms --- pkgs/applications/editors/vim/plugins/overrides.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index 175969fd573d..bb74c4a41733 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -1414,6 +1414,10 @@ in homepage = "https://github.com/willothy/moveline.nvim"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ redxtech ]; + badPlatforms = [ + "aarch64-darwin" + "x86_64-darwin" + ]; }; nvimRequireCheck = "moveline"; };