plugins/octo: use ghPackage

This commit is contained in:
Austin Horstman 2024-09-13 22:44:14 -05:00
parent 4d460d6151
commit dfea178590
No known key found for this signature in database
2 changed files with 18 additions and 2 deletions

View file

@ -12,8 +12,6 @@ helpers.neovim-plugin.mkNeovimPlugin {
maintainers = [ helpers.maintainers.svl ]; maintainers = [ helpers.maintainers.svl ];
extraPackages = [ pkgs.gh ];
settingsOptions = { settingsOptions = {
use_local_fs = helpers.defaultNullOpts.mkBool false '' use_local_fs = helpers.defaultNullOpts.mkBool false ''
Use local files on right side of reviews. Use local files on right side of reviews.
@ -167,9 +165,17 @@ helpers.neovim-plugin.mkNeovimPlugin {
}; };
}; };
extraOptions = {
ghPackage = lib.mkPackageOption pkgs "GitHub CLI" {
default = "gh";
nullable = true;
};
};
extraConfig = extraConfig =
cfg: cfg:
mkMerge [ mkMerge [
{ extraPackages = [ cfg.ghPackage ]; }
(mkIf (cfg.settings.picker == null || cfg.settings.picker == "telescope") { (mkIf (cfg.settings.picker == null || cfg.settings.picker == "telescope") {
plugins.telescope.enable = mkDefault true; plugins.telescope.enable = mkDefault true;
}) })

View file

@ -1,3 +1,4 @@
{ pkgs, ... }:
{ {
empty = { empty = {
# This test is flaky and fails non-deterministically # This test is flaky and fails non-deterministically
@ -84,4 +85,13 @@
}; };
}; };
}; };
no-packages = {
# Need to add gh executable to runtime path for plugin
test.runNvim = false;
plugins.octo = {
enable = true;
ghPackage = null;
};
};
} }