2021-12-06 16:07:01 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "aliyun-cli";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "3.0.113";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "aliyun";
|
|
|
|
repo = pname;
|
|
|
|
fetchSubmodules = true;
|
2022-03-30 09:31:56 +00:00
|
|
|
sha256 = "sha256-+ZbfWFAf7G5mwtSgfGe/oslqIbOqqiwdtP9mWx/3u4w=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
2021-12-21 02:18:32 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
vendorSha256 = "sha256-FQvBq8+80h7m271gjraV445ayWcpkemOtVswfmHzUM0=";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2021-12-21 02:18:32 +00:00
|
|
|
subPackages = [ "main" ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X github.com/aliyun/aliyun-cli/cli.Version=${version}" ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/main $out/bin/aliyun
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2021-12-21 02:18:32 +00:00
|
|
|
description = "Tool to manage and use Alibaba Cloud resources through a command line interface";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://github.com/aliyun/aliyun-cli";
|
2022-03-05 16:20:37 +00:00
|
|
|
changelog = "https://github.com/aliyun/aliyun-cli/releases/tag/v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ornxka ];
|
|
|
|
};
|
|
|
|
}
|