1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00

Merge pull request #328538 from antholeole/oleina/hopkak

kakounePlugins.hop-kak: init at 0.2.0
This commit is contained in:
Philip Taron 2024-08-04 18:12:58 -07:00 committed by GitHub
commit f06a5d1cd4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 50 additions and 1 deletions

View file

@ -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";

View file

@ -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";

View file

@ -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...