2021-12-06 16:07:01 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "aliyun-cli";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "3.0.160";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "aliyun";
|
|
|
|
repo = pname;
|
|
|
|
fetchSubmodules = true;
|
2023-04-12 12:48:02 +00:00
|
|
|
sha256 = "sha256-gMAYtvmP8dKiLITPx5sWkj3vRJNT468kEA2obCIDER4=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
2021-12-21 02:18:32 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
vendorHash = "sha256-H1qeJ37FaQY/EQtg3467gG8tA1PLyXaF8Sb5qKLf4wU=";
|
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
|
|
|
};
|
|
|
|
}
|