git.iko.soy/typeable/nixpkgs
on master help sign in
gh: 1.8.1 -> 1.9.0

https://github.com/cli/cli/releases/tag/v1.9.0

commit9c8cb61854439b7ce67272d7449314c51dd71fc4 authorzowoq <59103226+zowoq@users.noreply.github.com> dateThu 15 Apr 2021, 16:19 (6 years ago) parent7bf3b1f
1 file changed+14−5
pkgs/applications/version-management/git-and-tools/gh/default.nix+14−5
pkgs/applications/version-management/git-and-tools/gh/default.nix+14−5
@@ -2,25 +2,33 @@
22
33buildGoModule rec {
44 pname = "gh";
5− version = "1.8.1";
5+ version = "1.9.0";
66
77 src = fetchFromGitHub {
88 owner = "cli";
99 repo = "cli";
1010 rev = "v${version}";
11− sha256 = "1q0vc9wr4n813mxkf7jjj3prw1n7xv4l985qd57pg4a2js1dqa1y";
11+ sha256 = "03i1x1j07vpq81c9dmpvpya21hwz9q54zm4przvc12jadgb31y1i";
1212 };
1313
14− vendorSha256 = "1wv30z0jg195nkpz3rwvhixyw81lg2wzwwajq9g6s3rfjj8gs9v2";
14+ vendorSha256 = "0j2jy7n7hca5ybwwgh7cvm77j96ngaq1a1l5bl70vjpd8hz2qapc";
1515
1616 nativeBuildInputs = [ installShellFiles ];
1717
18+ # upstream unsets these to handle cross but it breaks our build
19+ postPatch = ''
20+ substituteInPlace Makefile \
21+ --replace "GOOS= GOARCH= GOARM= GOFLAGS= CGO_ENABLED=" ""
22+ '';
23+
1824 buildPhase = ''
19− export GO_LDFLAGS="-s -w"
20− make GH_VERSION=${version} bin/gh manpages
25+ runHook preBuild
26+ make GO_LDFLAGS="-s -w" GH_VERSION=${version} bin/gh manpages
27+ runHook postBuild
2128 '';
2229
2330 installPhase = ''
31+ runHook preInstall
2432 install -Dm755 bin/gh -t $out/bin
2533 installManPage share/man/*/*.[1-9]
2634
@@ -28,6 +36,7 @@ buildGoModule rec {
2836 $out/bin/gh completion -s $shell > gh.$shell
2937 installShellCompletion gh.$shell
3038 done
39+ runHook postInstall
3140 '';
3241
3342 # fails with `unable to find git executable in PATH`