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