diff options
author | Teo Klestrup Röijezon <teo@nullable.se> | 2020-07-29 13:50:59 +0200 |
---|---|---|
committer | Teo Klestrup Röijezon <teo@nullable.se> | 2020-07-29 13:50:59 +0200 |
commit | 76856fc3334edfc59c3b9652b92f1dbaea3de1b2 (patch) | |
tree | a0a07fe7aeca2e4045be92f85994f13761cb2c1f /pkgs/applications/networking/cluster/istioctl | |
parent | 0f23e0b661d26199118f18d65cca9ab1d2f1c64d (diff) |
istioctl: bundle release metadata
This is required for `istioctl version` to return the correct info, and for
`istioctl install` to default to the correct Docker images.
Diffstat (limited to 'pkgs/applications/networking/cluster/istioctl')
-rw-r--r-- | pkgs/applications/networking/cluster/istioctl/default.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/applications/networking/cluster/istioctl/default.nix b/pkgs/applications/networking/cluster/istioctl/default.nix index 60dc2119ac50..e4197a50ef15 100644 --- a/pkgs/applications/networking/cluster/istioctl/default.nix +++ b/pkgs/applications/networking/cluster/istioctl/default.nix @@ -14,11 +14,22 @@ buildGoModule rec { nativeBuildInputs = [ go-bindata ]; + # Bundle charts preBuild = '' patchShebangs operator/scripts operator/scripts/create_assets_gen.sh ''; + # Bundle release metadata + buildFlagsArray = let + attrs = [ + "istio.io/pkg/version.buildVersion=${version}" + "istio.io/pkg/version.buildStatus=Nix" + "istio.io/pkg/version.buildTag=${version}" + "istio.io/pkg/version.buildHub=docker.io/istio" + ]; + in ["-ldflags=${lib.concatMapStringsSep " " (attr: "-X ${attr}") attrs}"]; + subPackages = [ "istioctl/cmd/istioctl" ]; meta = with lib; { |