2021-09-18 10:52:07 +00:00
|
|
|
{ lib, stdenv, buildFishPlugin, fetchFromGitHub, fd, fzf, util-linux, clownfish, fishtape_3 }:
|
2021-03-12 07:09:13 +00:00
|
|
|
|
|
|
|
buildFishPlugin rec {
|
|
|
|
pname = "fzf.fish";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "9.2";
|
2021-03-12 07:09:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PatrickF1";
|
|
|
|
repo = "fzf.fish";
|
|
|
|
rev = "v${version}";
|
2022-08-21 13:32:41 +00:00
|
|
|
sha256 = "sha256-XmRGe39O3xXmTvfawwT2mCwLIyXOlQm7f40mH5tzz+s=";
|
2021-03-12 07:09:13 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ fzf fd util-linux ];
|
2021-03-12 07:09:13 +00:00
|
|
|
checkPlugins = [ clownfish fishtape_3 ];
|
|
|
|
checkFunctionDirs = [ "./functions" ];
|
|
|
|
checkPhase = ''
|
|
|
|
# Disable git tests which inspect the project's git repo, which isn't
|
|
|
|
# possible since we strip the impure .git from our build input
|
|
|
|
rm -r tests/*git*
|
|
|
|
|
|
|
|
# Disable tests that are failing, probably because of our wrappers
|
2021-09-18 10:52:07 +00:00
|
|
|
rm -r tests/configure_bindings
|
2021-03-12 07:09:13 +00:00
|
|
|
rm -r tests/search_shell_variables
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
# Disable tests that are failing, because there is not 'rev' command
|
|
|
|
rm tests/preview_file/custom_file_preview.fish
|
|
|
|
|
|
|
|
'' + (
|
|
|
|
if stdenv.isDarwin then ''script /dev/null fish -c "fishtape tests/*/*.fish"''
|
|
|
|
else ''script -c 'fish -c "fishtape tests/*/*.fish"' ''
|
|
|
|
);
|
2021-03-12 07:09:13 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Augment your fish command line with fzf key bindings";
|
|
|
|
homepage = "https://github.com/PatrickF1/fzf.fish";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ pacien ];
|
|
|
|
};
|
|
|
|
}
|