diff options
author | Jiajie Chen <c@jia.je> | 2022-07-09 19:04:11 +0800 |
---|---|---|
committer | Jiajie Chen <c@jia.je> | 2022-08-01 22:12:38 +0800 |
commit | a9787960ea0110c1e0acce0109c1b8d178041e90 (patch) | |
tree | 0d0c0d06f87a843e0bbf16b619f3a99339b07497 /pkgs/tools/admin/copilot-cli | |
parent | db22bf966a8ddd9ab448875d44cc7a2a44a0fa8d (diff) |
copilot-cli: init at 1.19.0
https://github.com/aws/copilot-cli/releases/tag/v1.19.0
Diffstat (limited to 'pkgs/tools/admin/copilot-cli')
-rw-r--r-- | pkgs/tools/admin/copilot-cli/default.nix | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/tools/admin/copilot-cli/default.nix b/pkgs/tools/admin/copilot-cli/default.nix new file mode 100644 index 0000000000000..3e12116d6e2ab --- /dev/null +++ b/pkgs/tools/admin/copilot-cli/default.nix @@ -0,0 +1,47 @@ +{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, copilot-cli }: + +buildGoModule rec { + pname = "copilot-cli"; + version = "1.19.0"; + + src = fetchFromGitHub { + owner = "aws"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-2zF/cBc6TjAcFAI3zJ0yBQrVWDK5nkxYYkb04bjSjgY="; + }; + + vendorSha256 = "sha256-1UFahXol1Lceccr/f24Mbhtk8bWyh4+Mb5VYZvF6VWs="; + + nativeBuildInputs = [ installShellFiles ]; + + # follow LINKER_FLAGS in Makefile + ldflags = [ + "-s" + "-w" + "-X github.com/aws/copilot-cli/internal/pkg/version.Version=${version}" + "-X github.com/aws/copilot-cli/internal/pkg/cli.binaryS3BucketPath=https://ecs-cli-v2-release.s3.amazonaws.com" + ]; + + subPackages = [ "./cmd/copilot" ]; + + postInstall = '' + installShellCompletion --cmd copilot \ + --bash <($out/bin/copilot completion bash) \ + --fish <($out/bin/copilot completion fish) \ + --zsh <($out/bin/copilot completion zsh) + ''; + + passthru.tests.version = testers.testVersion { + package = copilot-cli; + command = "copilot version"; + }; + + meta = with lib; { + description = "Build, Release and Operate Containerized Applications on AWS."; + homepage = "https://github.com/aws/copilot-cli"; + changelog = "https://github.com/aws/copilot-cli/releases/tag/v${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ jiegec ]; + }; +} |