nixpkgs/pkgs/applications/editors/kakoune/plugins/kak-fzf.nix

40 lines
972 B
Nix
Raw Normal View History

2021-01-18 01:45:34 -08:00
{ lib, stdenv, fetchFromGitHub, fzf }:
2021-01-15 05:21:58 -08:00
assert lib.asserts.assertOneOf "fzf" fzf.pname [ "fzf" "skim" ];
stdenv.mkDerivation {
name = "kak-fzf";
2020-12-27 17:40:35 -08:00
version = "2020-07-26";
src = fetchFromGitHub {
owner = "andreyorst";
repo = "fzf.kak";
2020-12-27 17:40:35 -08:00
rev = "f23daa698ad95493fbd675ae153e3cac13ef34e9";
hash = "sha256-BfXHTJ371ThOizMI/4BAbdJoaltGSP586hz4HqX1KWA=";
};
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
'';
2021-01-15 05:21:58 -08:00
meta = with lib;
{ description = "Kakoune plugin that brings integration with fzf";
homepage = "https://github.com/andreyorst/fzf.kak";
license = licenses.mit;
maintainers = with maintainers; [ nrdxp ];
platform = platforms.all;
};
}