Merge pull request #94164 from teozkr/feature/94163-istioctl-bundle-charts

istioctl: bundle charts
This commit is contained in:
Daniël de Kok 2020-08-01 17:51:26 +02:00 committed by GitHub
commit ae75863043
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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; {