2022-06-16 17:23:12 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, fetchpatch, testers, docker-credential-gcr }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "docker-credential-gcr";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "2.1.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "GoogleCloudPlatform";
|
|
|
|
repo = "docker-credential-gcr";
|
|
|
|
rev = "v${version}";
|
2022-06-16 17:23:12 +00:00
|
|
|
sha256 = "sha256-1AUs8Gt2Qw8BJk2zwRcazVl+POkPSy9e1jW9Mk/0rx8=";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-TestGet_GCRCredentials.patch";
|
|
|
|
url = "https://github.com/GoogleCloudPlatform/docker-credential-gcr/commit/a0c080e58bbfdeb0aa24e66551c4e8b0359bf178.patch";
|
|
|
|
sha256 = "sha256-aXp/1kNaxqQDPszC7pO+qP7ZBWHjpVljUHiKFnnDWuM=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
rm -rf ./test
|
|
|
|
'';
|
|
|
|
|
|
|
|
vendorSha256 = "sha256-e7XNTizZYp/tS7KRvB9KxY3Yurphnm6Ehz4dHZNReK8=";
|
|
|
|
|
|
|
|
CGO_ENABLED = 0;
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/GoogleCloudPlatform/docker-credential-gcr/config.Version=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = docker-credential-gcr;
|
|
|
|
command = "docker-credential-gcr version";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A Docker credential helper for GCR (https://gcr.io) users";
|
|
|
|
longDescription = ''
|
|
|
|
docker-credential-gcr is Google Container Registry's Docker credential
|
|
|
|
helper. It allows for Docker clients v1.11+ to easily make
|
|
|
|
authenticated requests to GCR's repositories (gcr.io, eu.gcr.io, etc.).
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/GoogleCloudPlatform/docker-credential-gcr";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ suvash ];
|
|
|
|
};
|
|
|
|
}
|