Merge pull request #319576 from redyf/add-cord

vimPlugins.cord-nvim: init at 2024-07-19
This commit is contained in:
Gaétan Lepage 2024-07-21 22:30:57 +02:00 committed by GitHub
commit a699a0fbf5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -549,6 +549,53 @@
patches = [ ./patches/coq_nvim/emulate-venv.patch ];
};
cord-nvim =
let
version = "2024-07-19";
src = fetchFromGitHub {
owner = "vyfor";
repo = "cord.nvim";
rev = "cd97c25320fb0a672b11bcd95d8332bb3088ecce";
hash = "sha256-66NtKteM1mvHP5wAU4e9JbsF+bq91lmCDcTh/6RPhoo=";
};
extension = if stdenv.isDarwin then "dylib" else "so";
rustPackage = rustPlatform.buildRustPackage {
pname = "cord.nvim-rust";
inherit version src;
cargoSha256 = "sha256-6FYf4pHEPxvhKHHPmkjQ40zPxaiypnpDxF8kNH+h+tg=";
installPhase = let
cargoTarget = stdenv.hostPlatform.rust.cargoShortTarget;
in ''
install -D target/${cargoTarget}/release/libcord.${extension} $out/lib/cord.${extension}
'';
};
in
buildVimPlugin {
pname = "cord.nvim";
inherit version src;
nativeBuildInputs = [
rustPackage
];
buildPhase = ''
install -D ${rustPackage}/lib/cord.${extension} cord.${extension}
'';
installPhase = ''
install -D cord $out/lua/cord.${extension}
'';
doInstallCheck = true;
nvimRequireCheck = "cord";
meta = {
homepage = "https://github.com/vyfor/cord.nvim";
};
};
cornelis = super.cornelis.overrideAttrs {
dependencies = with self; [ vim-textobj-user ];
opt = with self; [ vim-which-key ];