1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
{
lib,
stdenv,
pkgs,
buildFishPlugin,
fetchFromGitHub,
fd,
unixtools,
procps,
clownfish,
fishtape_3,
}:
let
# we want `pkgs.fzf`, not `fishPlugins.fzf`
inherit (pkgs) fzf;
in
buildFishPlugin rec {
pname = "fzf.fish";
version = "11.0";
src = fetchFromGitHub {
owner = "PatrickF1";
repo = "fzf.fish";
rev = "v${version}";
hash = "sha256-H7HgYT+okuVXo2SinrSs+hxAKCn4Q4su7oMbebKd/7s=";
};
nativeCheckInputs = [
fzf
fd
unixtools.script
procps
];
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*
rm -r tests/preview_changed_file/modified_path_with_spaces.fish
rm -r tests/preview_changed_file/renamed_path_modifications.fish
# Disable tests that are failing, probably because of our wrappers
rm -r tests/configure_bindings
rm -r tests/search_variables
# Disable tests that are failing, because there is not 'rev' command
rm tests/preview_file/custom_file_preview.fish
''
+ (
if stdenv.hostPlatform.isDarwin then
''script /dev/null fish -c "fishtape tests/*/*.fish"''
else
''script -c 'fish -c "fishtape tests/*/*.fish"' ''
);
meta = {
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}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
euxane
natsukium
];
broken = stdenv.hostPlatform.isDarwin;
};
}
|