From 97b64bd65e08f8e6d937f9f360aa5365c356bb33 Mon Sep 17 00:00:00 2001 From: pacien Date: Tue, 9 Mar 2021 13:08:17 +0100 Subject: [PATCH 1/3] fishPlugins.clownfish: init at unstable-2021-01-17 --- pkgs/shells/fish/plugins/clownfish.nix | 20 ++++++++++++++++++++ pkgs/shells/fish/plugins/default.nix | 2 ++ 2 files changed, 22 insertions(+) create mode 100644 pkgs/shells/fish/plugins/clownfish.nix diff --git a/pkgs/shells/fish/plugins/clownfish.nix b/pkgs/shells/fish/plugins/clownfish.nix new file mode 100644 index 000000000000..cd5c997d3114 --- /dev/null +++ b/pkgs/shells/fish/plugins/clownfish.nix @@ -0,0 +1,20 @@ +{ lib, buildFishPlugin, fetchFromGitHub }: + +buildFishPlugin { + pname = "clownfish"; + version = "unstable-2021-01-17"; + + src = fetchFromGitHub { + owner = "IlanCosman"; + repo = "clownfish"; + rev = "a0db28d8280d05561b8f48c0465480725feeca4c"; + sha256 = "04xvikyrdm6yxh588vbpwvm04fas76pa7sigsaqrip7yh021xxab"; + }; + + meta = with lib; { + description = "Fish function to mock the behaviour of commands"; + homepage = "https://github.com/IlanCosman/clownfish"; + license = licenses.mit; + maintainers = with maintainers; [ pacien ]; + }; +} diff --git a/pkgs/shells/fish/plugins/default.nix b/pkgs/shells/fish/plugins/default.nix index e543d49516a8..9d7043c97921 100644 --- a/pkgs/shells/fish/plugins/default.nix +++ b/pkgs/shells/fish/plugins/default.nix @@ -4,6 +4,8 @@ lib.makeScope newScope (self: with self; { buildFishPlugin = callPackage ./build-fish-plugin.nix { }; + clownfish = callPackage ./clownfish.nix { }; + fishtape = callPackage ./fishtape.nix { }; foreign-env = callPackage ./foreign-env { }; From d7145807ada972df1ba22dba54a1fc4e4f23fd47 Mon Sep 17 00:00:00 2001 From: pacien Date: Tue, 9 Mar 2021 13:10:36 +0100 Subject: [PATCH 2/3] fishPlugins.fishtape_3: init at 3.0.1 Keeping fishtape 2.x and 3.x separate because they aren't compatible with each other and are still both being used to test different packages. --- pkgs/shells/fish/plugins/default.nix | 3 +++ pkgs/shells/fish/plugins/fishtape_3.nix | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/shells/fish/plugins/fishtape_3.nix diff --git a/pkgs/shells/fish/plugins/default.nix b/pkgs/shells/fish/plugins/default.nix index 9d7043c97921..a61329dc4a7c 100644 --- a/pkgs/shells/fish/plugins/default.nix +++ b/pkgs/shells/fish/plugins/default.nix @@ -6,7 +6,10 @@ lib.makeScope newScope (self: with self; { clownfish = callPackage ./clownfish.nix { }; + # Fishtape 2.x and 3.x aren't compatible, + # but both versions are used in the tests of different other plugins. fishtape = callPackage ./fishtape.nix { }; + fishtape_3 = callPackage ./fishtape_3.nix { }; foreign-env = callPackage ./foreign-env { }; diff --git a/pkgs/shells/fish/plugins/fishtape_3.nix b/pkgs/shells/fish/plugins/fishtape_3.nix new file mode 100644 index 000000000000..893e6d65ffb3 --- /dev/null +++ b/pkgs/shells/fish/plugins/fishtape_3.nix @@ -0,0 +1,25 @@ +{ lib, buildFishPlugin, fetchFromGitHub }: + +buildFishPlugin rec { + pname = "fishtape"; + version = "3.0.1"; + + src = fetchFromGitHub { + owner = "jorgebucaran"; + repo = "fishtape"; + rev = version; + sha256 = "072a3qbk1lpxw53bxp91drsffylx8fbywhss3x0jbnayn9m8i7aa"; + }; + + checkFunctionDirs = [ "./functions" ]; # fishtape is introspective + checkPhase = '' + fishtape tests/*.fish + ''; + + meta = with lib; { + description = "100% pure-Fish test runner"; + homepage = "https://github.com/jorgebucaran/fishtape"; + license = licenses.mit; + maintainers = with maintainers; [ pacien ]; + }; +} From 74a66734cd4faa89773ff784f074cfae4ec05047 Mon Sep 17 00:00:00 2001 From: pacien Date: Tue, 9 Mar 2021 13:11:49 +0100 Subject: [PATCH 3/3] fishPlugins.fzf-fish: init at 5.6 --- pkgs/shells/fish/plugins/default.nix | 2 ++ pkgs/shells/fish/plugins/fzf-fish.nix | 34 +++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/shells/fish/plugins/fzf-fish.nix diff --git a/pkgs/shells/fish/plugins/default.nix b/pkgs/shells/fish/plugins/default.nix index a61329dc4a7c..50b8eb4d981e 100644 --- a/pkgs/shells/fish/plugins/default.nix +++ b/pkgs/shells/fish/plugins/default.nix @@ -13,6 +13,8 @@ lib.makeScope newScope (self: with self; { foreign-env = callPackage ./foreign-env { }; + fzf-fish = callPackage ./fzf-fish.nix { }; + pure = callPackage ./pure.nix { }; }) diff --git a/pkgs/shells/fish/plugins/fzf-fish.nix b/pkgs/shells/fish/plugins/fzf-fish.nix new file mode 100644 index 000000000000..51e7dcc096b8 --- /dev/null +++ b/pkgs/shells/fish/plugins/fzf-fish.nix @@ -0,0 +1,34 @@ +{ lib, buildFishPlugin, fetchFromGitHub, fzf, clownfish, fishtape_3 }: + +buildFishPlugin rec { + pname = "fzf.fish"; + version = "5.6"; + + src = fetchFromGitHub { + owner = "PatrickF1"; + repo = "fzf.fish"; + rev = "v${version}"; + sha256 = "1b280n8bh00n4vkm19zrn84km52296ljlm1zhz95jgaiwymf2x73"; + }; + + checkInputs = [ fzf ]; + 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 + rm -r tests/search_shell_variables + + fishtape tests/*/*.fish + ''; + + 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 ]; + }; +}