nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, pkgs, buildFishPlugin, fetchFromGitHub, fd, unixtools, procps, clownfish, fishtape_3, }:
2let
3 # we want `pkgs.fzf`, not `fishPlugins.fzf`
4 inherit (pkgs) fzf;
5in
6buildFishPlugin rec {
7 pname = "fzf.fish";
8 version = "10.3";
9
10 src = fetchFromGitHub {
11 owner = "PatrickF1";
12 repo = "fzf.fish";
13 rev = "v${version}";
14 hash = "sha256-T8KYLA/r/gOKvAivKRoeqIwE2pINlxFQtZJHpOy9GMM=";
15 };
16
17 nativeCheckInputs = [ fzf fd unixtools.script procps ];
18 checkPlugins = [ clownfish fishtape_3 ];
19 checkFunctionDirs = [ "./functions" ];
20 checkPhase = ''
21 # Disable git tests which inspect the project's git repo, which isn't
22 # possible since we strip the impure .git from our build input
23 rm -r tests/*git*
24 rm -r tests/preview_changed_file/modified_path_with_spaces.fish
25 rm -r tests/preview_changed_file/renamed_path_modifications.fish
26
27 # Disable tests that are failing, probably because of our wrappers
28 rm -r tests/configure_bindings
29 rm -r tests/search_variables
30
31 # Disable tests that are failing, because there is not 'rev' command
32 rm tests/preview_file/custom_file_preview.fish
33 '' + (
34 if stdenv.isDarwin then ''script /dev/null fish -c "fishtape tests/*/*.fish"''
35 else ''script -c 'fish -c "fishtape tests/*/*.fish"' ''
36 );
37
38 meta = with lib; {
39 description = "Augment your fish command line with fzf key bindings";
40 homepage = "https://github.com/PatrickF1/fzf.fish";
41 changelog = "https://github.com/PatrickF1/fzf.fish/releases/tag/${src.rev}";
42 license = licenses.mit;
43 maintainers = with maintainers; [ pacien natsukium ];
44 };
45}