vimPlugins.LanguageClient-neovim: move out of vim generated

This commit is contained in:
Austin Horstman
2024-12-19 22:05:18 -06:00
parent e2118dbf11
commit fbba3cb434
4 changed files with 52 additions and 49 deletions

View File

@@ -0,0 +1,51 @@
{
lib,
fetchFromGitHub,
nix-update-script,
rustPlatform,
vimUtils,
}:
let
version = "0.1.161";
src = fetchFromGitHub {
owner = "autozimu";
repo = "LanguageClient-neovim";
tag = version;
hash = "sha256-Z9S2ie9RxJCIbmjSV/Tto4lK04cZfWmK3IAy8YaySVI=";
};
LanguageClient-neovim-bin = rustPlatform.buildRustPackage {
pname = "LanguageClient-neovim-bin";
inherit version src;
cargoHash = "sha256-H34UqJ6JOwuSABdOup5yKeIwFrGc83TUnw1ggJEx9o4=";
};
in
vimUtils.buildVimPlugin {
pname = "LanguageClient-neovim";
inherit version src;
propagatedBuildInputs = [ LanguageClient-neovim-bin ];
preFixup = ''
substituteInPlace "$out"/autoload/LanguageClient.vim \
--replace-fail \
"let l:path = s:root . '/bin/'" \
"let l:path = '${LanguageClient-neovim-bin}' . '/bin/'"
'';
passthru = {
updateScript = nix-update-script {
extraArgs = [ "--version-regex=(\\d+\\.\\d+\\.\\d+)" ];
attrPath = "vimPlugins.LanguageClient-neovim.LanguageClient-neovim-bin";
};
# needed for the update script
inherit LanguageClient-neovim-bin;
};
meta = {
homepage = "https://github.com/autozimu/LanguageClient-neovim/";
changelog = "https://github.com/autozimu/LanguageClient-neovim/releases/tag/${src.tag}";
license = lib.licenses.mit;
};
}

View File

@@ -159,18 +159,6 @@ final: prev:
meta.homepage = "https://github.com/martinda/Jenkinsfile-vim-syntax/";
};
LanguageClient-neovim = buildVimPlugin {
pname = "LanguageClient-neovim";
version = "2022-06-07";
src = fetchFromGitHub {
owner = "autozimu";
repo = "LanguageClient-neovim";
rev = "cf6dd11baf62fb6ce18308e96c0ab43428b7c686";
sha256 = "0jmbxc0li4w59dzpzadq2phnfhnibggwxb3rvlmhr88dbglm0s8n";
};
meta.homepage = "https://github.com/autozimu/LanguageClient-neovim/";
};
LanguageTool-nvim = buildVimPlugin {
pname = "LanguageTool.nvim";
version = "2020-10-19";

View File

@@ -1398,42 +1398,7 @@ in
nvimRequireCheck = "kulala";
};
LanguageClient-neovim =
let
version = "0.1.161";
LanguageClient-neovim-src = fetchFromGitHub {
owner = "autozimu";
repo = "LanguageClient-neovim";
rev = version;
sha256 = "Z9S2ie9RxJCIbmjSV/Tto4lK04cZfWmK3IAy8YaySVI=";
};
LanguageClient-neovim-bin = rustPlatform.buildRustPackage {
pname = "LanguageClient-neovim-bin";
inherit version;
src = LanguageClient-neovim-src;
cargoHash = "sha256-H34UqJ6JOwuSABdOup5yKeIwFrGc83TUnw1ggJEx9o4=";
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ];
# FIXME: Use impure version of CoreFoundation because of missing symbols.
# Undefined symbols for architecture x86_64: "_CFURLResourceIsReachable"
preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ''
export NIX_LDFLAGS="-F${CoreFoundation}/Library/Frameworks -framework CoreFoundation $NIX_LDFLAGS"
'';
};
in
buildVimPlugin {
pname = "LanguageClient-neovim";
inherit version;
src = LanguageClient-neovim-src;
propagatedBuildInputs = [ LanguageClient-neovim-bin ];
preFixup = ''
substituteInPlace "$out"/autoload/LanguageClient.vim \
--replace "let l:path = s:root . '/bin/'" "let l:path = '${LanguageClient-neovim-bin}' . '/bin/'"
'';
};
LanguageClient-neovim = callPackage ./LanguageClient-neovim { };
LazyVim = super.LazyVim.overrideAttrs {
# Any other dependency is optional

View File

@@ -12,7 +12,6 @@ https://github.com/antoinemadec/FixCursorHold.nvim/,,
https://github.com/vim-scripts/Improved-AnsiEsc/,,
https://github.com/ionide/Ionide-vim/,HEAD,
https://github.com/martinda/Jenkinsfile-vim-syntax/,,
https://github.com/autozimu/LanguageClient-neovim/,,
https://github.com/vigoux/LanguageTool.nvim/,,
https://github.com/LazyVim/LazyVim/,,
https://github.com/Yggdroot/LeaderF/,,