git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #115519 from pacien/fishPlugins-fzf-fish-init
commit53012ee4f0905997c6283b71bbd1590885eab504 authorSandro <sandro.jaeckel@gmail.com> dateWed 10 Mar 2021, 12:11 (6 years ago) parentdaff1f874a6673
4 files changed+86
pkgs/shells/fish/plugins/clownfish.nix+20 pkgs/shells/fish/plugins/default.nix+7 pkgs/shells/fish/plugins/fishtape_3.nix+25 pkgs/shells/fish/plugins/fzf-fish.nix+34
pkgs/shells/fish/plugins/clownfish.nixnew file+20
@@ -0,0 +1,20 @@
1+{ lib, buildFishPlugin, fetchFromGitHub }:
2+
3+buildFishPlugin {
4+ pname = "clownfish";
5+ version = "unstable-2021-01-17";
6+
7+ src = fetchFromGitHub {
8+ owner = "IlanCosman";
9+ repo = "clownfish";
10+ rev = "a0db28d8280d05561b8f48c0465480725feeca4c";
11+ sha256 = "04xvikyrdm6yxh588vbpwvm04fas76pa7sigsaqrip7yh021xxab";
12+ };
13+
14+ meta = with lib; {
15+ description = "Fish function to mock the behaviour of commands";
16+ homepage = "https://github.com/IlanCosman/clownfish";
17+ license = licenses.mit;
18+ maintainers = with maintainers; [ pacien ];
19+ };
20+}
pkgs/shells/fish/plugins/default.nix+7
@@ -4,10 +4,17 @@ lib.makeScope newScope (self: with self; {
44
55 buildFishPlugin = callPackage ./build-fish-plugin.nix { };
66
7+ clownfish = callPackage ./clownfish.nix { };
8+
9+ # Fishtape 2.x and 3.x aren't compatible,
10+ # but both versions are used in the tests of different other plugins.
711 fishtape = callPackage ./fishtape.nix { };
12+ fishtape_3 = callPackage ./fishtape_3.nix { };
813
914 foreign-env = callPackage ./foreign-env { };
1015
16+ fzf-fish = callPackage ./fzf-fish.nix { };
17+
1118 pure = callPackage ./pure.nix { };
1219
1320})
pkgs/shells/fish/plugins/fishtape_3.nixnew file+25
@@ -0,0 +1,25 @@
1+{ lib, buildFishPlugin, fetchFromGitHub }:
2+
3+buildFishPlugin rec {
4+ pname = "fishtape";
5+ version = "3.0.1";
6+
7+ src = fetchFromGitHub {
8+ owner = "jorgebucaran";
9+ repo = "fishtape";
10+ rev = version;
11+ sha256 = "072a3qbk1lpxw53bxp91drsffylx8fbywhss3x0jbnayn9m8i7aa";
12+ };
13+
14+ checkFunctionDirs = [ "./functions" ]; # fishtape is introspective
15+ checkPhase = ''
16+ fishtape tests/*.fish
17+ '';
18+
19+ meta = with lib; {
20+ description = "100% pure-Fish test runner";
21+ homepage = "https://github.com/jorgebucaran/fishtape";
22+ license = licenses.mit;
23+ maintainers = with maintainers; [ pacien ];
24+ };
25+}
pkgs/shells/fish/plugins/fzf-fish.nixnew file+34
@@ -0,0 +1,34 @@
1+{ lib, buildFishPlugin, fetchFromGitHub, fzf, clownfish, fishtape_3 }:
2+
3+buildFishPlugin rec {
4+ pname = "fzf.fish";
5+ version = "5.6";
6+
7+ src = fetchFromGitHub {
8+ owner = "PatrickF1";
9+ repo = "fzf.fish";
10+ rev = "v${version}";
11+ sha256 = "1b280n8bh00n4vkm19zrn84km52296ljlm1zhz95jgaiwymf2x73";
12+ };
13+
14+ checkInputs = [ fzf ];
15+ checkPlugins = [ clownfish fishtape_3 ];
16+ checkFunctionDirs = [ "./functions" ];
17+ checkPhase = ''
18+ # Disable git tests which inspect the project's git repo, which isn't
19+ # possible since we strip the impure .git from our build input
20+ rm -r tests/*git*
21+
22+ # Disable tests that are failing, probably because of our wrappers
23+ rm -r tests/search_shell_variables
24+
25+ fishtape tests/*/*.fish
26+ '';
27+
28+ meta = with lib; {
29+ description = "Augment your fish command line with fzf key bindings";
30+ homepage = "https://github.com/PatrickF1/fzf.fish";
31+ license = licenses.mit;
32+ maintainers = with maintainers; [ pacien ];
33+ };
34+}