nixpkgs/pkgs/tools/admin/aliyun-cli/default.nix
2023-09-03 17:13:48 +10:00

34 lines
922 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "aliyun-cli";
version = "3.0.180";
src = fetchFromGitHub {
rev = "v${version}";
owner = "aliyun";
repo = pname;
fetchSubmodules = true;
sha256 = "sha256-w1t1sx7Pcv444x3YPNSg3fRQdPga2Q9Z1+Iad7OTjOM=";
};
vendorHash = "sha256-bL1S6GML7XuLraVXcd6NcC3VSYAd05F2ktzI0KF3G8A=";
subPackages = [ "main" ];
ldflags = [ "-s" "-w" "-X github.com/aliyun/aliyun-cli/cli.Version=${version}" ];
postInstall = ''
mv $out/bin/main $out/bin/aliyun
'';
meta = with lib; {
description = "Tool to manage and use Alibaba Cloud resources through a command line interface";
homepage = "https://github.com/aliyun/aliyun-cli";
changelog = "https://github.com/aliyun/aliyun-cli/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ ornxka ];
mainProgram = "aliyun";
};
}