From a034898ee12639b64b8918d537e66ed8954c7aa4 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Tue, 8 Oct 2024 15:50:20 -0500 Subject: [PATCH] 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;