2021-12-06 16:07:01 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "aliyun-cli";
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "3.0.131";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "aliyun";
|
|
|
|
repo = pname;
|
|
|
|
fetchSubmodules = true;
|
2022-10-21 18:38:19 +00:00
|
|
|
sha256 = "sha256-YE4+/pzUPk8wte+3ITFfhb9tn5RvaGCteAnirouITSo=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
2021-12-21 02:18:32 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
vendorSha256 = "sha256-rUYlFM9OlPXGzxXyOxweUs6md7HhjocC56F+OtT/IXo=";
|
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 ];
|
2022-04-27 09:35:20 +00:00
|
|
|
mainProgram = "aliyun";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
}
|