diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 68887b5cd8bb..efa1c334af24 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -22725,6 +22725,12 @@ githubId = 3302; name = "Renzo Carbonara"; }; + replicapra = { + name = "replicapra"; + github = "replicapra"; + githubId = 154707993; + email = "nixpkgs@replicapra.dev"; + }; repparw = { email = "ubritos@gmail.com"; github = "repparw"; diff --git a/pkgs/by-name/gh/gh-enhance/package.nix b/pkgs/by-name/gh/gh-enhance/package.nix new file mode 100644 index 000000000000..4491492d7ff4 --- /dev/null +++ b/pkgs/by-name/gh/gh-enhance/package.nix @@ -0,0 +1,50 @@ +{ + lib, + fetchFromGitHub, + buildGoModule, + installShellFiles, + stdenv, + writableTmpDirAsHomeHook, +}: +buildGoModule (finalAttrs: { + pname = "gh-enhance"; + version = "0.5.1"; + + src = fetchFromGitHub { + owner = "dlvhdr"; + repo = "gh-enhance"; + rev = "v${finalAttrs.version}"; + hash = "sha256-IHtI8wnPLMkqxdBFXqkt6inYMOIqKjdTKdZbTxIhPzo="; + }; + + vendorHash = "sha256-rgql0vsHAzWeubw4EYBu/yPmm2QeADsIeACWsbcWtSk="; + + ldflags = [ + "-s" + "-w" + "-X github.com/dlvhdr/gh-enhance/cmd.Version=${finalAttrs.version}" + ]; + + checkFlags = [ + # requires network + "-skip=TestFullOutput" + ]; + + nativeCheckInputs = [ writableTmpDirAsHomeHook ]; + doInstallCheck = true; + nativeBuildInputs = [ installShellFiles ]; + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd gh-enhance \ + --bash <($out/bin/gh-enhance completion bash) \ + --fish <($out/bin/gh-enhance completion fish) \ + --zsh <($out/bin/gh-enhance completion zsh) + ''; + meta = { + changelog = "https://github.com/dlvhdr/gh-enhance/releases/tag/${finalAttrs.src.rev}"; + description = "Terminal UI for GitHub Actions"; + homepage = "https://www.gh-dash.dev/enhance"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ replicapra ]; + mainProgram = "gh-enhance"; + }; +})