docker-buildx: pass version to ldflags

With this change `docker buildx version` behaves as
expected. Fixes #177540.

Signed-off-by: Robin Gögge <r.goegge@gmail.com>
This commit is contained in:
Robin Gögge 2022-06-13 20:45:55 +02:00
parent 3e40af10b5
commit c673e1ff02

View file

@ -13,6 +13,12 @@ buildGoModule rec {
vendorSha256 = null;
ldflags = [
"-w" "-s"
"-X github.com/docker/buildx/version.Package=github.com/docker/buildx"
"-X github.com/docker/buildx/version.Version=v${version}"
];
installPhase = ''
install -D $GOPATH/bin/buildx $out/libexec/docker/cli-plugins/docker-buildx
'';