diff --git a/pkgs/applications/networking/cluster/istioctl/default.nix b/pkgs/applications/networking/cluster/istioctl/default.nix index 90ce1d82f490..e4197a50ef15 100644 --- a/pkgs/applications/networking/cluster/istioctl/default.nix +++ b/pkgs/applications/networking/cluster/istioctl/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, go-bindata }: buildGoModule rec { pname = "istioctl"; @@ -12,6 +12,24 @@ buildGoModule rec { }; vendorSha256 = "15l9z2a8p46jvmkl0vvm6s196mlics0qgmpm3yq3bn6cqnybdsij"; + 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; {