Unverified Commit f06a5d1c authored by Philip Taron's avatar Philip Taron Committed by GitHub
Browse files

Merge pull request #328538 from antholeole/oleina/hopkak

kakounePlugins.hop-kak: init at 0.2.0
parents 83c75d34 1d4821cd
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -15164,6 +15164,12 @@
    githubId = 848535;
    name = "Oleg Lebedev";
  };
  oleina = {
    email = "antholeinik@gmail.com";
    github = "antholeole";
    githubId = 48811365;
    name = "Anthony Oleinik";
  };
  olejorgenb = {
    email = "olejorgenb@yahoo.no";
    github = "olejorgenb";
+36 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
, buildKakounePluginFrom2Nix
, kakoune-lsp, parinfer-rust, rep
, fzf, git, guile, kakoune-unwrapped, lua5_3, plan9port
, rustPlatform
}:

self: super: {
@@ -131,6 +132,41 @@ declare-option -hidden str ansi_filter %{'"$out"'/bin/kak-ansi-filter}
    '';
  });

  hop-kak = rustPlatform.buildRustPackage rec {
    pname = "hop-kak";
    version = "0.2.0";

    src = fetchgit {
      url = "https://git.sr.ht/~hadronized/hop.kak";
      rev = "7314ec64809a69e0044ba7ec57a18b43e3b5f005";
      sha256 = "stmGZQU0tp+5xxrexKMzwSwHj5F/F4HzDO9BorNWC3w=";

      # this package uses git to put the commit hash in the
      # help dialog, so leave the .git folder so the command
      # succeeds.
      leaveDotGit = true;
    };

    nativeBuildInputs = [
      git
    ];

    cargoHash = "sha256-EjSj/+BysGwJBxK6Ccg2+pXHdB2Lg3dxIURRsSVTHVY=";

    postInstall = ''
      mkdir -p $out/share/kak/bin
      mv $out/bin/hop-kak $out/share/kak/bin/
    '';

    meta = with lib; {
      description = "hinting brought to Kakoune selections";
      homepage = "https://git.sr.ht/~hadronized/hop.kak/";
      license = licenses.bsd3;
      maintainers = with maintainers; [ oleina ];
      platforms = platforms.all;
    };
  };

  quickscope-kak = buildKakounePluginFrom2Nix rec {
    pname = "quickscope-kak";
    version = "1.0.0";
+8 −1
Original line number Diff line number Diff line
@@ -14,10 +14,17 @@ in
    paths = [ kakoune ] ++ requestedPlugins;

    postBuild = ''
      # create a directory for bins that kakoune needs
      # access to, without polluting the users path by adding
      # that binary nested with this symlinkJoin.
      mkdir -p $out/share/kak/bin

      # location of kak binary is used to find ../share/kak/autoload,
      # unless explicitly overriden with KAKOUNE_RUNTIME
      rm "$out/bin/kak"
      makeWrapper "${kakoune}/bin/kak" "$out/bin/kak" --set KAKOUNE_RUNTIME "$out/share/kak"
      makeWrapper "${kakoune}/bin/kak" "$out/bin/kak" \
        --set KAKOUNE_RUNTIME "$out/share/kak" \
        --set PATH "$PATH:$out/share/kak/bin"

      # currently kakoune ignores doc files if they are symlinks, so workaround by
      # copying doc files over, so they become regular files...