From 0a6d5bcaa842ee577b90ca74a5c0b652c7939652 Mon Sep 17 00:00:00 2001 From: Redyf Date: Sat, 20 Jul 2024 11:20:07 -0300 Subject: [PATCH] vimPlugins.cord-nvim: init at 2024-07-19 Co-authored-by: Fedi Jamoussi --- .../editors/vim/plugins/overrides.nix | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index 6cf4dca3ddf7..0d6c247dfd38 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -545,6 +545,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 ];