Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 50 lines 1.1 kB view raw
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 writableTmpDirAsHomeHook, 6 nix-update-script, 7}: 8 9buildGoModule rec { 10 pname = "aliyun-cli"; 11 version = "3.0.291"; 12 13 src = fetchFromGitHub { 14 owner = "aliyun"; 15 repo = "aliyun-cli"; 16 tag = "v${version}"; 17 hash = "sha256-/nrspG9pB8pOnkTpnY3/4872sfe1Wg14MnKftEz4YX0="; 18 fetchSubmodules = true; 19 }; 20 21 vendorHash = "sha256-pa60hGn1UmzSgmopw+OAFgsL0o7mjEXTpYLAHgdTcMI="; 22 23 subPackages = [ "main" ]; 24 25 ldflags = [ 26 "-s" 27 "-w" 28 "-X github.com/aliyun/aliyun-cli/v3/cli.Version=${version}" 29 ]; 30 31 nativeCheckInputs = [ writableTmpDirAsHomeHook ]; 32 33 postInstall = '' 34 mv $out/bin/main $out/bin/aliyun 35 ''; 36 37 passthru.updateScript = nix-update-script { }; 38 39 meta = { 40 description = "Tool to manage and use Alibaba Cloud resources through a command line interface"; 41 homepage = "https://github.com/aliyun/aliyun-cli"; 42 changelog = "https://github.com/aliyun/aliyun-cli/releases/tag/v${version}"; 43 license = lib.licenses.asl20; 44 maintainers = with lib.maintainers; [ 45 ornxka 46 ryan4yin 47 ]; 48 mainProgram = "aliyun"; 49 }; 50}