2024-03-24 13:39:35 +03:00
|
|
|
{
|
|
|
|
buildGoModule,
|
|
|
|
docker-credential-gcr,
|
|
|
|
fetchFromGitHub,
|
|
|
|
lib,
|
|
|
|
nix-update-script,
|
|
|
|
testers,
|
|
|
|
}:
|
2018-02-18 17:21:12 +03:00
|
|
|
|
2022-04-17 03:26:38 +03:00
|
|
|
buildGoModule rec {
|
2019-08-15 15:41:18 +03:00
|
|
|
pname = "docker-credential-gcr";
|
2024-07-24 08:06:27 +03:00
|
|
|
version = "2.1.23";
|
2018-02-18 17:21:12 +03:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "GoogleCloudPlatform";
|
|
|
|
repo = "docker-credential-gcr";
|
2024-03-24 13:40:01 +03:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-24 08:06:27 +03:00
|
|
|
sha256 = "sha256-ViZxxqRZQPevuK/yueHKmg4CwnNpgfyXszGalzWucko=";
|
2022-04-17 03:26:38 +03:00
|
|
|
};
|
|
|
|
|
2022-05-21 03:16:47 +03:00
|
|
|
postPatch = ''
|
|
|
|
rm -rf ./test
|
|
|
|
'';
|
|
|
|
|
2024-03-24 13:40:01 +03:00
|
|
|
vendorHash = "sha256-VsJ5OI8D1u9qZqtirYf682+z0wLJr/vAxRLHAEGwKSY=";
|
2022-04-17 03:26:38 +03:00
|
|
|
|
|
|
|
CGO_ENABLED = 0;
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
2024-03-24 13:40:01 +03:00
|
|
|
"-X github.com/GoogleCloudPlatform/docker-credential-gcr/v2/config.Version=${version}"
|
2022-04-17 03:26:38 +03:00
|
|
|
];
|
|
|
|
|
2024-03-24 13:39:35 +03:00
|
|
|
passthru = {
|
|
|
|
tests.version = testers.testVersion {
|
|
|
|
package = docker-credential-gcr;
|
|
|
|
command = "docker-credential-gcr version";
|
|
|
|
};
|
|
|
|
updateScript = nix-update-script { };
|
2018-02-18 17:21:12 +03:00
|
|
|
};
|
|
|
|
|
2024-03-24 13:40:01 +03:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2021-01-11 10:54:33 +03:00
|
|
|
meta = with lib; {
|
2018-02-18 17:21:12 +03:00
|
|
|
description = "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.).
|
|
|
|
'';
|
2020-04-01 04:11:51 +03:00
|
|
|
homepage = "https://github.com/GoogleCloudPlatform/docker-credential-gcr";
|
2024-03-24 13:40:01 +03:00
|
|
|
changelog = "https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases/tag/v${version}";
|
2018-02-18 17:21:12 +03:00
|
|
|
license = licenses.asl20;
|
2024-03-24 13:40:23 +03:00
|
|
|
maintainers = with maintainers; [ suvash anthonyroussel ];
|
2024-02-11 05:19:15 +03:00
|
|
|
mainProgram = "docker-credential-gcr";
|
2018-02-18 17:21:12 +03:00
|
|
|
};
|
|
|
|
}
|