1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00
nixpkgs/pkgs/shells/fish/plugins/fzf-fish.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.6 KiB
Nix
Raw Normal View History

{ lib, stdenv, pkgs, buildFishPlugin, fetchFromGitHub, fd, unixtools, procps, clownfish, fishtape_3, }:
2023-04-03 06:37:31 +01:00
let
# we want `pkgs.fzf`, not `fishPlugins.fzf`
inherit (pkgs) fzf;
in
2021-03-09 12:11:49 +00:00
buildFishPlugin rec {
pname = "fzf.fish";
2023-12-05 15:54:25 +00:00
version = "10.2";
2021-03-09 12:11:49 +00:00
src = fetchFromGitHub {
owner = "PatrickF1";
repo = "fzf.fish";
rev = "v${version}";
2023-12-05 15:54:25 +00:00
hash = "sha256-1/MLKkUHe4c9YLDrH+cnL+pLiSOSERbIZSM4FTG3wF0=";
2021-03-09 12:11:49 +00:00
};
nativeCheckInputs = [ fzf fd unixtools.script procps ];
2021-03-09 12:11:49 +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*
2023-04-03 06:37:31 +01:00
rm -r tests/preview_changed_file/modified_path_with_spaces.fish
rm -r tests/preview_changed_file/renamed_path_modifications.fish
2021-03-09 12:11:49 +00:00
# Disable tests that are failing, probably because of our wrappers
rm -r tests/configure_bindings
2023-04-03 06:37:31 +01:00
rm -r tests/search_variables
2021-03-09 12:11:49 +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-09 12:11:49 +00:00
meta = with lib; {
description = "Augment your fish command line with fzf key bindings";
homepage = "https://github.com/PatrickF1/fzf.fish";
changelog = "https://github.com/PatrickF1/fzf.fish/releases/tag/${src.rev}";
2021-03-09 12:11:49 +00:00
license = licenses.mit;
maintainers = with maintainers; [ pacien natsukium ];
2021-03-09 12:11:49 +00:00
};
}