go-containerregistry: make the package easier to find

Also move to ldflags attribute
This commit is contained in:
06kellyjac 2021-08-08 13:08:13 +01:00
parent e195c3cf6f
commit 3cd9a76092

View file

@ -10,20 +10,19 @@ buildGoModule rec {
rev = "v${version}"; rev = "v${version}";
hash = "sha256-3mvGHAPKDUmrQkBKwlxnF6PG0ZpZDqlM9SMkCyC5ytE="; hash = "sha256-3mvGHAPKDUmrQkBKwlxnF6PG0ZpZDqlM9SMkCyC5ytE=";
}; };
vendorSha256 = null; vendorSha256 = null;
subPackages = [ "cmd/crane" "cmd/gcrane" ]; subPackages = [ "cmd/crane" "cmd/gcrane" ];
buildFlagsArray = [ ldflags =
"-ldflags=-s -w -X github.com/google/go-containerregistry/cmd/crane/cmd.Version=${version} -X github.com/google/go-containerregistry/pkg/v1/remote/transport.Version=${version}" 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 # NOTE: no tests
doCheck = false; doCheck = false;
meta = with lib; { meta = with lib; {
description = "A tool for interacting with remote images and registries"; description = "Tools for interacting with remote images and registries including crane and gcrane";
homepage = "https://github.com/google/go-containerregistry"; homepage = "https://github.com/google/go-containerregistry";
license = licenses.apsl20; license = licenses.apsl20;
maintainers = with maintainers; [ yurrriq ]; maintainers = with maintainers; [ yurrriq ];