2020-04-24 23:36:52 +00:00
|
|
|
{ lib, fetchFromGitHub, buildGoModule, installShellFiles }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gh";
|
2020-05-15 21:57:56 +00:00
|
|
|
version = "0.8.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cli";
|
|
|
|
repo = "cli";
|
|
|
|
rev = "v${version}";
|
2020-05-15 21:57:56 +00:00
|
|
|
sha256 = "08fy3677yq52x40rab49ijhw4r25ls2807dbv9wpna6w07n7r8v7";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
vendorSha256 = "0s99bjmsafnzhl3s2lcybxgsw1s4i1h3vh6p40gz4vsfhndidqrq";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildFlagsArray = [
|
|
|
|
"-ldflags=-s -w -X github.com/cli/cli/command.Version=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
subPackages = [ "cmd/gh" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
|
|
for shell in bash fish zsh; do
|
|
|
|
$out/bin/gh completion -s $shell > gh.$shell
|
|
|
|
installShellCompletion gh.$shell
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "GitHub CLI tool";
|
|
|
|
homepage = "https://cli.github.com/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ zowoq ];
|
|
|
|
};
|
2020-05-15 21:57:56 +00:00
|
|
|
}
|