nixpkgs/pkgs/tools/admin/docker-credential-gcr/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
1.7 KiB
Nix
Raw Normal View History

{
buildGoModule,
docker-credential-gcr,
fetchFromGitHub,
lib,
nix-update-script,
testers,
}:
2022-04-17 03:26:38 +03:00
buildGoModule rec {
pname = "docker-credential-gcr";
2023-04-02 06:08:44 +03:00
version = "2.1.8";
src = fetchFromGitHub {
owner = "GoogleCloudPlatform";
repo = "docker-credential-gcr";
rev = "v${version}";
2023-04-02 06:08:44 +03:00
sha256 = "sha256-6f84NRqMx0NX+3g+pCYgRYkGK4DaQmUEau3oMswUmSE=";
2022-04-17 03:26:38 +03:00
};
2022-05-21 03:16:47 +03:00
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
'';
2023-03-28 13:58:06 +03:00
vendorHash = "sha256-e7XNTizZYp/tS7KRvB9KxY3Yurphnm6Ehz4dHZNReK8=";
2022-04-17 03:26:38 +03:00
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";
};
updateScript = nix-update-script { };
};
meta = with lib; {
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 ];
2024-02-11 05:19:15 +03:00
mainProgram = "docker-credential-gcr";
};
}