mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 23:23:07 +00:00
47 lines
1.1 KiB
Nix
47 lines
1.1 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
buildGoModule rec {
|
|
pname = "civo";
|
|
version = "1.0.41";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "civo";
|
|
repo = "cli";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-dvbxxW+UyTA+EzBV6g9JRao8D6ZE5hhXLX4q/mmPIQg=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-gBVSpjoAfbxlJnlrFrsBupJgVQ59sh1ipOry0Mgppig=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
CGO_ENABLED = 0;
|
|
|
|
# Some lint checks fail
|
|
doCheck = false;
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-X github.com/civo/cli/common.VersionCli=${version}"
|
|
"-X github.com/civo/cli/common.CommitCli=${src.rev}"
|
|
"-X github.com/civo/cli/common.DateCli=unknown"
|
|
];
|
|
|
|
doInstallCheck = false;
|
|
|
|
postInstall = ''
|
|
mv $out/bin/cli $out/bin/civo
|
|
installShellCompletion --cmd civo \
|
|
--bash <($out/bin/civo completion bash) \
|
|
--fish <($out/bin/civo completion fish) \
|
|
--zsh <($out/bin/civo completion zsh)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "CLI for interacting with Civo resources";
|
|
homepage = "https://github.com/civo/cli";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ berryp ];
|
|
};
|
|
}
|