git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit76856fc3334edfc59c3b9652b92f1dbaea3de1b2 authorTeo Klestrup Röijezon <teo@nullable.se> dateWed 29 Jul 2020, 13:50 (6 years ago) parent0f23e0b
1 file changed+11
pkgs/applications/networking/cluster/istioctl/default.nix+11
pkgs/applications/networking/cluster/istioctl/default.nix+11
@@ -14,11 +14,22 @@ buildGoModule rec {
1414
1515 nativeBuildInputs = [ go-bindata ];
1616
17+ # Bundle charts
1718 preBuild = ''
1819 patchShebangs operator/scripts
1920 operator/scripts/create_assets_gen.sh
2021 '';
2122
23+ # Bundle release metadata
24+ buildFlagsArray = let
25+ attrs = [
26+ "istio.io/pkg/version.buildVersion=${version}"
27+ "istio.io/pkg/version.buildStatus=Nix"
28+ "istio.io/pkg/version.buildTag=${version}"
29+ "istio.io/pkg/version.buildHub=docker.io/istio"
30+ ];
31+ in ["-ldflags=${lib.concatMapStringsSep " " (attr: "-X ${attr}") attrs}"];
32+
2233 subPackages = [ "istioctl/cmd/istioctl" ];
2334
2435 meta = with lib; {