From 0619df716ed738e1818532bc6fd74c701a92f572 Mon Sep 17 00:00:00 2001 From: Maiko Tan Date: Sat, 28 Jun 2025 09:28:09 +0800 Subject: [PATCH] gh-signoff: init at 0.2.1 Co-authored-by: Aleksana --- pkgs/by-name/gh/gh-signoff/package.nix | 61 ++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 pkgs/by-name/gh/gh-signoff/package.nix diff --git a/pkgs/by-name/gh/gh-signoff/package.nix b/pkgs/by-name/gh/gh-signoff/package.nix new file mode 100644 index 000000000000..51dbcb45377a --- /dev/null +++ b/pkgs/by-name/gh/gh-signoff/package.nix @@ -0,0 +1,61 @@ +{ + lib, + stdenvNoCC, + fetchFromGitHub, + + bash, + gh, + git, + jq, + + makeWrapper, + nix-update-script, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "gh-signoff"; + version = "0.2.1"; # version is in the script + + src = fetchFromGitHub { + owner = "basecamp"; + repo = "gh-signoff"; + rev = "24f274070c9dfbb3916347dbf6f9d38d4fb64eca"; # Repo didn't have a valid Git tag for specific version + hash = "sha256-jqRbh4To6uHoohkNZrzgmGWOBp/Mahmjm5NwXjmshhM="; + }; + + nativeBuildInputs = [ + makeWrapper + ]; + + buildInputs = [ bash ]; + + strictDeps = true; + + runtimeDeps = [ + gh + git + jq + ]; + + installPhase = '' + runHook preInstall + install -D -m755 "gh-signoff" "$out/bin/gh-signoff" + runHook postInstall + ''; + + postFixup = '' + wrapProgram "$out/bin/gh-signoff" \ + --prefix PATH : "${lib.makeBinPath finalAttrs.runtimeDeps}" + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "GitHub CLI extension for local CI to sign off on your own work"; + homepage = "https://github.com/basecamp/gh-signoff"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ maikotan ]; + mainProgram = "gh-signoff"; + inherit (gh.meta) platforms; + }; +})