depot/third_party/nixpkgs/pkgs/development/tools/go-containerregistry/default.nix
Default email 48d4c8cc3c Project import generated by Copybara.
GitOrigin-RevId: 6ef4f522d63f22b40004319778761040d3197390
2021-08-08 17:34:03 -06:00

30 lines
853 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "go-containerregistry";
version = "0.4.1";
src = fetchFromGitHub {
owner = "google";
repo = pname;
rev = "v${version}";
hash = "sha256-3mvGHAPKDUmrQkBKwlxnF6PG0ZpZDqlM9SMkCyC5ytE=";
};
vendorSha256 = null;
subPackages = [ "cmd/crane" "cmd/gcrane" ];
ldflags =
let t = "github.com/google/go-containerregistry"; in
[ "-s" "-w" "-X ${t}/cmd/crane/cmd.Version=v${version}" "-X ${t}/pkg/v1/remote/transport.Version=${version}" ];
# NOTE: no tests
doCheck = false;
meta = with lib; {
description = "Tools for interacting with remote images and registries including crane and gcrane";
homepage = "https://github.com/google/go-containerregistry";
license = licenses.apsl20;
maintainers = with maintainers; [ yurrriq ];
};
}