Skip to content

Commit

Permalink
Merge pull request NixOS#328538 from antholeole/oleina/hopkak
Browse files Browse the repository at this point in the history
kakounePlugins.hop-kak: init at 0.2.0
  • Loading branch information
philiptaron authored Aug 5, 2024
2 parents 83c75d3 + 1d4821c commit f06a5d1
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
36 changes: 36 additions & 0 deletions pkgs/applications/editors/kakoune/plugins/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
, buildKakounePluginFrom2Nix
, kakoune-lsp, parinfer-rust, rep
, fzf, git, guile, kakoune-unwrapped, lua5_3, plan9port
, rustPlatform
}:

self: super: {
Expand Down Expand Up @@ -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";
Expand Down
9 changes: 8 additions & 1 deletion pkgs/applications/editors/kakoune/wrapper.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand Down

0 comments on commit f06a5d1

Please sign in to comment.