1be0098156
GitOrigin-RevId: 667e5581d16745bcda791300ae7e2d73f49fff25
47 lines
1.4 KiB
Nix
47 lines
1.4 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, copilot-cli }:
|
|
|
|
buildGoModule rec {
|
|
pname = "copilot-cli";
|
|
version = "1.23.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "aws";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-K+OWAZudk/xxKZw0zdsJfMj1jRhzOamBI7wd5ttmaiY=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-DCjJJZKVDFyZXItWRzBsxb8xLZNDLWI2kAp4KKKn9yA=";
|
|
|
|
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 ];
|
|
};
|
|
}
|