2021-10-25 02:40:20 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "aliyun-cli";
|
2022-02-18 00:51:28 +00:00
|
|
|
version = "3.0.108";
|
2021-10-25 02:40:20 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "aliyun";
|
|
|
|
repo = pname;
|
|
|
|
fetchSubmodules = true;
|
2022-02-18 00:51:28 +00:00
|
|
|
sha256 = "sha256-hbT7pG4IRIzFzbaUVnCpSb5h13h2158cbGf2qn8c268=";
|
2021-10-25 02:40:20 +01:00
|
|
|
};
|
2021-12-19 04:20:00 +00:00
|
|
|
|
2021-12-05 18:09:50 +00:00
|
|
|
vendorSha256 = "sha256-c7LsCNcxdHwDBEknXJt9AyrmFcem8YtUYy06vNDBdDY=";
|
2021-10-25 02:40:20 +01:00
|
|
|
|
2021-12-19 04:20:00 +00:00
|
|
|
subPackages = [ "main" ];
|
2021-10-25 02:40:20 +01:00
|
|
|
|
2021-12-19 04:20:00 +00:00
|
|
|
ldFlags = [ "-s" "-w" "-X github.com/aliyun/aliyun-cli/cli.Version=${version}" ];
|
2021-10-25 02:40:20 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/main $out/bin/aliyun
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2021-12-19 04:20:00 +00:00
|
|
|
description = "Tool to manage and use Alibaba Cloud resources through a command line interface";
|
2021-10-25 02:40:20 +01:00
|
|
|
homepage = "https://github.com/aliyun/aliyun-cli";
|
2021-12-19 04:20:00 +00:00
|
|
|
changelog = "https://github.com/aliyun/aliyun-cli/raw/v${version}/CHANGELOG.md";
|
2021-10-25 02:40:20 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ornxka ];
|
|
|
|
};
|
|
|
|
}
|