From 1e3da2d0a6657d30460006fc4359c0c434fbb870 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Wed, 16 Oct 2024 10:04:24 -0500 Subject: [PATCH 1/2] gh: format --- .../version-management/gh/default.nix | 37 ++++++++++++------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/pkgs/applications/version-management/gh/default.nix b/pkgs/applications/version-management/gh/default.nix index d04b844e84f7..59e2b3604dfa 100644 --- a/pkgs/applications/version-management/gh/default.nix +++ b/pkgs/applications/version-management/gh/default.nix @@ -1,4 +1,12 @@ -{ lib, fetchFromGitHub, buildGoModule, installShellFiles, stdenv, testers, gh }: +{ + lib, + fetchFromGitHub, + buildGoModule, + installShellFiles, + stdenv, + testers, + gh, +}: buildGoModule rec { pname = "gh"; @@ -21,19 +29,22 @@ buildGoModule rec { runHook postBuild ''; - installPhase = '' - runHook preInstall - install -Dm755 bin/gh -t $out/bin - '' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' - installManPage share/man/*/*.[1-9] + installPhase = + '' + runHook preInstall + install -Dm755 bin/gh -t $out/bin + '' + + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installManPage share/man/*/*.[1-9] - installShellCompletion --cmd gh \ - --bash <($out/bin/gh completion -s bash) \ - --fish <($out/bin/gh completion -s fish) \ - --zsh <($out/bin/gh completion -s zsh) - '' + '' - runHook postInstall - ''; + installShellCompletion --cmd gh \ + --bash <($out/bin/gh completion -s bash) \ + --fish <($out/bin/gh completion -s fish) \ + --zsh <($out/bin/gh completion -s zsh) + '' + + '' + runHook postInstall + ''; # most tests require network access doCheck = false; From 8b77143ca167ce8f3d5bebeb757ec376457c3ea0 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Wed, 16 Oct 2024 10:05:23 -0500 Subject: [PATCH 2/2] gh: 2.58.0 -> 2.59.0 --- pkgs/applications/version-management/gh/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/version-management/gh/default.nix b/pkgs/applications/version-management/gh/default.nix index 59e2b3604dfa..746c8d40a393 100644 --- a/pkgs/applications/version-management/gh/default.nix +++ b/pkgs/applications/version-management/gh/default.nix @@ -10,16 +10,16 @@ buildGoModule rec { pname = "gh"; - version = "2.58.0"; + version = "2.59.0"; src = fetchFromGitHub { owner = "cli"; repo = "cli"; - rev = "v${version}"; - hash = "sha256-KHJKE550XlGdB++jq/1kHP4o1QISbPtbt4GU9uIP3RE="; + rev = "refs/tags/v${version}"; + hash = "sha256-QOc99KmcGk9b9uy1/y1FSe0zYE1q0g06k7niqtsMDmY="; }; - vendorHash = "sha256-6T9LQNzGpADLwI0pFvjBe5rqbXOEDZmjYCy4RhNqcFI="; + vendorHash = "sha256-Mje0IbvRj6pmOe8s8PX87ntPE+ZZeciLyOP6fmv7PmI="; nativeBuildInputs = [ installShellFiles ];