diff --git a/pkgs/applications/editors/vim/plugins/generated.nix b/pkgs/applications/editors/vim/plugins/generated.nix index 4201ae9c839f..41da08ed2349 100644 --- a/pkgs/applications/editors/vim/plugins/generated.nix +++ b/pkgs/applications/editors/vim/plugins/generated.nix @@ -9533,18 +9533,6 @@ final: prev: meta.homepage = "https://github.com/lucidph3nx/nvim-sops/"; }; - nvim-spectre = buildVimPlugin { - pname = "nvim-spectre"; - version = "2024-10-27"; - src = fetchFromGitHub { - owner = "nvim-pack"; - repo = "nvim-spectre"; - rev = "08be31c104df3b4b049607694ebb2b6ced4f928b"; - sha256 = "04v1gypga9fhmkddis5yyppvmpq0b1b7zpvbfjlxfp2z498l5n2v"; - }; - meta.homepage = "https://github.com/nvim-pack/nvim-spectre/"; - }; - nvim-spider = buildVimPlugin { pname = "nvim-spider"; version = "2024-12-03"; diff --git a/pkgs/applications/editors/vim/plugins/nvim-spectre/default.nix b/pkgs/applications/editors/vim/plugins/nvim-spectre/default.nix new file mode 100644 index 000000000000..4de9cbeaa0a3 --- /dev/null +++ b/pkgs/applications/editors/vim/plugins/nvim-spectre/default.nix @@ -0,0 +1,61 @@ +{ + lib, + fetchFromGitHub, + nix-update-script, + rustPlatform, + vimPlugins, + vimUtils, +}: +let + version = "0-unstable-2024-10-27"; + src = fetchFromGitHub { + owner = "nvim-pack"; + repo = "nvim-spectre"; + rev = "08be31c104df3b4b049607694ebb2b6ced4f928b"; + sha256 = "04v1gypga9fhmkddis5yyppvmpq0b1b7zpvbfjlxfp2z498l5n2v"; + }; + + spectre_oxi = rustPlatform.buildRustPackage { + pname = "spectre_oxi"; + inherit version src; + sourceRoot = "${src.name}/spectre_oxi"; + + cargoHash = "sha256-jVNeK1BeCzQaS5G561iWB3xEupzjIgnbUpEo1IVr9nQ="; + + preCheck = '' + mkdir tests/tmp/ + ''; + + checkFlags = [ + # Flaky test (https://github.com/nvim-pack/nvim-spectre/issues/244) + "--skip=tests::test_replace_simple" + ]; + }; +in +vimUtils.buildVimPlugin { + pname = "nvim-spectre"; + inherit version src; + + dependencies = [ vimPlugins.plenary-nvim ]; + + postInstall = '' + ln -s ${spectre_oxi}/lib/libspectre_oxi.* $out/lua/spectre_oxi.so + ''; + + nvimRequireCheck = "spectre"; + + passthru = { + updateScript = nix-update-script { + extraArgs = [ "--version=branch" ]; + attrPath = "vimPlugins.nvim-spectre.spectre_oxi"; + }; + + # needed for the update script + inherit spectre_oxi; + }; + + meta = { + homepage = "https://github.com/nvim-pack/nvim-spectre/"; + license = lib.licenses.mit; + }; +} diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index 1530e2f009c3..b9344187b0a4 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -2362,35 +2362,6 @@ in buildInputs = [ ripgrep ]; }; - nvim-spectre = super.nvim-spectre.overrideAttrs ( - old: - let - spectre_oxi = rustPlatform.buildRustPackage { - pname = "spectre_oxi"; - inherit (old) version src; - sourceRoot = "${old.src.name}/spectre_oxi"; - - cargoHash = "sha256-yYUbfqkICsGDKexYjfhXfpIoT1+QrZQJPpKzk+gwm+s="; - - preCheck = '' - mkdir tests/tmp/ - ''; - - checkFlags = [ - # Flaky test (https://github.com/nvim-pack/nvim-spectre/issues/244) - "--skip=tests::test_replace_simple" - ]; - }; - in - { - dependencies = [ self.plenary-nvim ]; - postInstall = '' - ln -s ${spectre_oxi}/lib/libspectre_oxi.* $out/lua/spectre_oxi.so - ''; - nvimRequireCheck = "spectre"; - } - ); - nvim-scissors = super.nvim-scissors.overrideAttrs { nvimRequireCheck = "scissors"; }; @@ -2400,6 +2371,8 @@ in nvimSkipModule = "snippets.utils.cmp"; }; + nvim-spectre = callPackage ./nvim-spectre { }; + nvim-surround = super.nvim-surround.overrideAttrs { # Optional treesitter integration nvimSkipModule = "nvim-surround.queries"; diff --git a/pkgs/applications/editors/vim/plugins/vim-plugin-names b/pkgs/applications/editors/vim/plugins/vim-plugin-names index e87c429fb6d6..8c1f805dab8f 100644 --- a/pkgs/applications/editors/vim/plugins/vim-plugin-names +++ b/pkgs/applications/editors/vim/plugins/vim-plugin-names @@ -791,7 +791,6 @@ https://github.com/garymjr/nvim-snippets/,, https://github.com/dcampos/nvim-snippy/,HEAD, https://github.com/ishan9299/nvim-solarized-lua/,, https://github.com/lucidph3nx/nvim-sops/,HEAD, -https://github.com/nvim-pack/nvim-spectre/,, https://github.com/chrisgrieser/nvim-spider/,HEAD, https://github.com/kylechui/nvim-surround/,main, https://github.com/svermeulen/nvim-teal-maker/,HEAD,