diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2022-09-30 06:47:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-30 06:47:45 -0500 |
commit | 10ecda252ce1b3b1d6403caeadbcc8f30d5ab796 (patch) | |
tree | 36421a7fe487001312667824927589952eb56a4b | |
parent | e77d90a767bff3ded6094e2731036b17f738b61b (diff) | |
parent | 57e41975e52e2360c88c0ff1460de958afd2fdd8 (diff) |
Merge pull request #193508 from aaronjheng/amazon-ecr-credential-helper-0.6.0
amazon-ecr-credential-helper: use buildGoModule
-rw-r--r-- | pkgs/tools/admin/amazon-ecr-credential-helper/default.nix | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/pkgs/tools/admin/amazon-ecr-credential-helper/default.nix b/pkgs/tools/admin/amazon-ecr-credential-helper/default.nix index ee083003ae7ba..19c4618bb9261 100644 --- a/pkgs/tools/admin/amazon-ecr-credential-helper/default.nix +++ b/pkgs/tools/admin/amazon-ecr-credential-helper/default.nix @@ -1,11 +1,9 @@ -{ buildGoPackage, fetchFromGitHub, lib, ... }: +{ lib, buildGoModule, fetchFromGitHub, testers, amazon-ecr-credential-helper }: -buildGoPackage rec { +buildGoModule rec { pname = "amazon-ecr-credential-helper"; version = "0.6.0"; - goPackagePath = "github.com/awslabs/amazon-ecr-credential-helper"; - src = fetchFromGitHub { owner = "awslabs"; repo = "amazon-ecr-credential-helper"; @@ -13,12 +11,26 @@ buildGoPackage rec { sha256 = "sha256-lkc8plWWmth8SjeWBCf1HTnCfg09QNIsN3xPePqnv6Y="; }; + vendorSha256 = null; + + modRoot = "./ecr-login"; + + ldflags = [ + "-s" + "-w" + "-X github.com/awslabs/amazon-ecr-credential-helper/ecr-login/version.Version=${version}" + ]; + + passthru.tests.version = testers.testVersion { + package = amazon-ecr-credential-helper; + command = "docker-credential-ecr-login -v"; + }; + meta = with lib; { description = "The Amazon ECR Docker Credential Helper is a credential helper for the Docker daemon that makes it easier to use Amazon Elastic Container Registry"; homepage = "https://github.com/awslabs/amazon-ecr-credential-helper"; license = licenses.asl20; maintainers = with maintainers; [ kalbasit ]; mainProgram = "docker-credential-ecr-login"; - platforms = platforms.linux ++ platforms.darwin; }; } |