gh: add extensions option
This commit is contained in:
parent
78f964347c
commit
8675cfa549
3 changed files with 44 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
gh-config-file = ./config-file.nix;
|
||||
gh-credential-helper = ./credential-helper.nix;
|
||||
gh-extensions = ./extensions.nix;
|
||||
gh-warnings = ./warnings.nix;
|
||||
}
|
||||
|
|
|
|||
27
tests/modules/programs/gh/extensions.nix
Normal file
27
tests/modules/programs/gh/extensions.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
extensions = [ pkgs.gh-eco ];
|
||||
};
|
||||
|
||||
test.stubs = {
|
||||
gh = { };
|
||||
gh-eco = {
|
||||
name = "gh-eco";
|
||||
buildScript = ''
|
||||
mkdir -p $out/bin
|
||||
touch $out/bin/gh-eco
|
||||
chmod +x $out/bin/gh-eco
|
||||
'';
|
||||
outPath = null;
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
gh_eco=home-files/.local/share/gh/extensions/gh-eco/gh-eco
|
||||
assertFileExists "$gh_eco"
|
||||
assertFileIsExecutable "$gh_eco"
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue