Unverified Commit a699a0fb authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

Merge pull request #319576 from redyf/add-cord

vimPlugins.cord-nvim: init at 2024-07-19
parents 9b84aa93 0a6d5bca
Loading
Loading
Loading
Loading
+47 −0
Original line number Diff line number Diff line
@@ -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 ];