docker-compose2: pass version to ldflags

The package already has a version in nixpkgs, but reports "dev" when asked via CLI.
With this change, `docker compose version` behaves as expected.
This commit is contained in:
whentze 2021-12-14 09:37:47 +01:00 committed by GitHub
parent 28707c3ce9
commit 23fc476f99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,6 +13,8 @@ buildGoModule rec {
vendorSha256 = "sha256-RzAQnuOjT8eMH+rJm+/JrF96PZbCgzDVNPQYUeXPWnY=";
ldflags = ["-X github.com/docker/compose/v2/internal.Version=${version}"];
doCheck = false;
installPhase = ''
install -D $GOPATH/bin/cmd $out/libexec/docker/cli-plugins/docker-compose