diff options
author | Robin Gögge <r.goegge@gmail.com> | 2022-06-13 20:45:55 +0200 |
---|---|---|
committer | Robin Gögge <r.goegge@gmail.com> | 2022-06-30 15:19:44 +0200 |
commit | c673e1ff023fb30ef4ee5506287c8947da94aa78 (patch) | |
tree | 3cc1a1c4a80fce84f09a9ebba15862e80a7ace6f | |
parent | 3e40af10b564bb809b0942743f349f17da0657c3 (diff) |
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>
-rw-r--r-- | pkgs/applications/virtualization/docker/buildx.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/applications/virtualization/docker/buildx.nix b/pkgs/applications/virtualization/docker/buildx.nix index e98eb404b9c7..b9d5a3e9275d 100644 --- a/pkgs/applications/virtualization/docker/buildx.nix +++ b/pkgs/applications/virtualization/docker/buildx.nix @@ -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 ''; |