kakounePlugins: add buildKakounePlugin helper
Same as buildVimPlugin but for Kakoune
This commit is contained in:
parent
3ad7ba46c5
commit
9ca73dd13f
@ -0,0 +1,33 @@
|
||||
{ lib, stdenv, rtpPath ? "share/kak/autoload/plugins" }:
|
||||
rec {
|
||||
buildKakounePlugin = attrs@{
|
||||
name ? "${attrs.pname}-${attrs.version}",
|
||||
namePrefix ? "kakplugin-",
|
||||
src,
|
||||
unpackPhase ? "",
|
||||
configurePhase ? "",
|
||||
buildPhase ? "",
|
||||
preInstall ? "",
|
||||
postInstall ? "",
|
||||
path ? lib.getName name,
|
||||
...
|
||||
}:
|
||||
stdenv.mkDerivation ((builtins.removeAttrs attrs [ "namePrefix" "path" ]) // {
|
||||
name = namePrefix + name;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
target=$out/${rtpPath}/${path}
|
||||
mkdir -p $out/${rtpPath}
|
||||
cp -r . $target
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
});
|
||||
|
||||
buildKakounePluginFrom2Nix = attrs: buildKakounePlugin ({
|
||||
buildPhase = ":";
|
||||
configurePhase = ":";
|
||||
} // attrs);
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{ lib, stdenv }:
|
||||
{
|
||||
inherit (import ./build-kakoune-plugin.nix { inherit lib stdenv; }) buildKakounePlugin buildKakounePluginFrom2Nix;
|
||||
}
|
@ -5533,6 +5533,7 @@ in
|
||||
kakoune = wrapKakoune kakoune-unwrapped {
|
||||
plugins = [ ]; # override with the list of desired plugins
|
||||
};
|
||||
kakouneUtils = callPackage ../applications/editors/kakoune/plugins/kakoune-utils.nix { };
|
||||
|
||||
kak-lsp = callPackage ../tools/misc/kak-lsp {
|
||||
inherit (darwin.apple_sdk.frameworks) Security;
|
||||
|
Loading…
Reference in New Issue
Block a user