3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/go-containerregistry/default.nix
06kellyjac 3cd9a76092 go-containerregistry: make the package easier to find
Also move to ldflags attribute
2021-08-08 13:08:13 +01:00

31 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 ];
};
}