2019-09-03 21:54:37 +01:00
|
|
|
{ stdenv, fetchFromGitHub, fzf }:
|
|
|
|
|
|
|
|
assert stdenv.lib.asserts.assertOneOf "fzf" fzf.pname [ "fzf" "skim" ];
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "kak-fzf";
|
2020-07-26 00:24:01 +01:00
|
|
|
version = "2020-05-24";
|
2019-09-03 21:54:37 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "andreyorst";
|
|
|
|
repo = "fzf.kak";
|
2020-07-26 00:24:01 +01:00
|
|
|
rev = "b2aeb26473962ab0bf3b51ba5c81c50c1d8253d3";
|
|
|
|
sha256 = "0bg845i814xh4y688p2zx726rsg0pd6nb4a7qv2fckmk639f4wzc";
|
2019-09-03 21:54:37 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
if [[ -x "${fzf}/bin/fzf" ]]; then
|
|
|
|
fzfImpl='${fzf}/bin/fzf'
|
|
|
|
else
|
|
|
|
fzfImpl='${fzf}/bin/sk'
|
|
|
|
fi
|
|
|
|
|
|
|
|
substituteInPlace rc/fzf.kak \
|
|
|
|
--replace \'fzf\' \'"$fzfImpl"\'
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/kak/autoload/plugins
|
|
|
|
cp -r rc $out/share/kak/autoload/plugins/fzf
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib;
|
|
|
|
{ description = "Kakoune plugin that brings integration with fzf";
|
|
|
|
homepage = "https://github.com/andreyorst/fzf.kak";
|
2019-10-07 15:54:32 +01:00
|
|
|
license = licenses.mit;
|
2019-09-03 21:54:37 +01:00
|
|
|
maintainers = with maintainers; [ nrdxp ];
|
|
|
|
platform = platforms.all;
|
|
|
|
};
|
|
|
|
}
|