Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, buildGoModule, fetchFromGitHub }: 2 3buildGoModule rec { 4 pname = "aliyun-cli"; 5 version = "3.0.181"; 6 7 src = fetchFromGitHub { 8 rev = "v${version}"; 9 owner = "aliyun"; 10 repo = pname; 11 fetchSubmodules = true; 12 sha256 = "sha256-xjOoWQyQCVoCDJMXboxFAyil7jRCWU6oIEt7gcPkIPo="; 13 }; 14 15 vendorHash = "sha256-S8Nthnr3wASvRyZS5UTHILPnUA+FeZJEwIvT0O39U3I="; 16 17 subPackages = [ "main" ]; 18 19 ldflags = [ "-s" "-w" "-X github.com/aliyun/aliyun-cli/cli.Version=${version}" ]; 20 21 postInstall = '' 22 mv $out/bin/main $out/bin/aliyun 23 ''; 24 25 meta = with lib; { 26 description = "Tool to manage and use Alibaba Cloud resources through a command line interface"; 27 homepage = "https://github.com/aliyun/aliyun-cli"; 28 changelog = "https://github.com/aliyun/aliyun-cli/releases/tag/v${version}"; 29 license = licenses.asl20; 30 maintainers = with maintainers; [ ornxka ]; 31 mainProgram = "aliyun"; 32 }; 33}