parent
7bf3b1fe95
commit
9c8cb61854
@ -2,25 +2,33 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "gh";
|
||||
version = "1.8.1";
|
||||
version = "1.9.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cli";
|
||||
repo = "cli";
|
||||
rev = "v${version}";
|
||||
sha256 = "1q0vc9wr4n813mxkf7jjj3prw1n7xv4l985qd57pg4a2js1dqa1y";
|
||||
sha256 = "03i1x1j07vpq81c9dmpvpya21hwz9q54zm4przvc12jadgb31y1i";
|
||||
};
|
||||
|
||||
vendorSha256 = "1wv30z0jg195nkpz3rwvhixyw81lg2wzwwajq9g6s3rfjj8gs9v2";
|
||||
vendorSha256 = "0j2jy7n7hca5ybwwgh7cvm77j96ngaq1a1l5bl70vjpd8hz2qapc";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
# upstream unsets these to handle cross but it breaks our build
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace "GOOS= GOARCH= GOARM= GOFLAGS= CGO_ENABLED=" ""
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
export GO_LDFLAGS="-s -w"
|
||||
make GH_VERSION=${version} bin/gh manpages
|
||||
runHook preBuild
|
||||
make GO_LDFLAGS="-s -w" GH_VERSION=${version} bin/gh manpages
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dm755 bin/gh -t $out/bin
|
||||
installManPage share/man/*/*.[1-9]
|
||||
|
||||
@ -28,6 +36,7 @@ buildGoModule rec {
|
||||
$out/bin/gh completion -s $shell > gh.$shell
|
||||
installShellCompletion gh.$shell
|
||||
done
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
# fails with `unable to find git executable in PATH`
|
||||
|
Loading…
x
Reference in New Issue
Block a user