git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #94164 from teozkr/feature/94163-istioctl-bundle-charts

istioctl: bundle charts

commitae758630431238b4de196741872302eefb14266f authorDaniël de Kok <me@danieldk.eu> dateSat 1 Aug 2020, 17:51 (6 years ago) parent153c78576856fc
1 file changed+19−1
pkgs/applications/networking/cluster/istioctl/default.nix+19−1
pkgs/applications/networking/cluster/istioctl/default.nix+19−1
@@ -1,4 +1,4 @@
1−{ lib, buildGoModule, fetchFromGitHub }:
1+{ lib, buildGoModule, fetchFromGitHub, go-bindata }:
22
33buildGoModule rec {
44 pname = "istioctl";
@@ -12,6 +12,24 @@ buildGoModule rec {
1212 };
1313 vendorSha256 = "15l9z2a8p46jvmkl0vvm6s196mlics0qgmpm3yq3bn6cqnybdsij";
1414
15+ nativeBuildInputs = [ go-bindata ];
16+
17+ # Bundle charts
18+ preBuild = ''
19+ patchShebangs operator/scripts
20+ operator/scripts/create_assets_gen.sh
21+ '';
22+
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+
1533 subPackages = [ "istioctl/cmd/istioctl" ];
1634
1735 meta = with lib; {