diff options
author | Aaron Jheng <wentworth@outlook.com> | 2022-11-13 14:23:56 +0000 |
---|---|---|
committer | Aaron Jheng <wentworth@outlook.com> | 2022-11-13 14:53:10 +0000 |
commit | 113a9e987026274ccc435b895267a6fb08d9b5e2 (patch) | |
tree | 5cbbc70a542e39c106abe22c45ed996fafe5829d | |
parent | 9f0ebc3f631afecc3723241d0f11b95283430067 (diff) |
ecs-agent: use buildGoModule
-rw-r--r-- | pkgs/applications/virtualization/ecs-agent/default.nix | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/pkgs/applications/virtualization/ecs-agent/default.nix b/pkgs/applications/virtualization/ecs-agent/default.nix index 22178fb74b84..88c5f3779df6 100644 --- a/pkgs/applications/virtualization/ecs-agent/default.nix +++ b/pkgs/applications/virtualization/ecs-agent/default.nix @@ -1,27 +1,30 @@ -{ lib, fetchFromGitHub, buildGoPackage }: +{ lib, fetchFromGitHub, buildGoModule }: -buildGoPackage rec { - pname = "amazon-ecs-agent"; +buildGoModule rec { + pname = "amazon-ecs-agent"; version = "1.66.2"; - goPackagePath = "github.com/aws/${pname}"; - subPackages = [ "agent" ]; - src = fetchFromGitHub { - rev = "v${version}"; - owner = "aws"; - repo = pname; - sha256 = "sha256-mZzDvD+40YiC8cBpLlYd7K1p5UBYpso9OMCDijopuik="; + rev = "v${version}"; + owner = "aws"; + repo = pname; + hash = "sha256-mZzDvD+40YiC8cBpLlYd7K1p5UBYpso9OMCDijopuik="; }; + vendorHash = null; + + modRoot = "./agent"; + + excludedPackages = [ "./version/gen" ]; + ldflags = [ "-s" "-w" ]; meta = with lib; { description = "The agent that runs on AWS EC2 container instances and starts containers on behalf of Amazon ECS"; - homepage = "https://github.com/aws/amazon-ecs-agent"; - changelog = "https://github.com/aws/amazon-ecs-agent/raw/v${version}/CHANGELOG.md"; - license = licenses.asl20; - platforms = platforms.unix; + homepage = "https://github.com/aws/amazon-ecs-agent"; + changelog = "https://github.com/aws/amazon-ecs-agent/raw/v${version}/CHANGELOG.md"; + license = licenses.asl20; + platforms = platforms.linux; maintainers = with maintainers; [ copumpkin ]; mainProgram = "agent"; }; |