76856fc333
This is required for `istioctl version` to return the correct info, and for `istioctl install` to default to the correct Docker images.
43 lines
1.2 KiB
Nix
43 lines
1.2 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, go-bindata }:
|
|
|
|
buildGoModule rec {
|
|
pname = "istioctl";
|
|
version = "1.6.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "istio";
|
|
repo = "istio";
|
|
rev = version;
|
|
sha256 = "0xga0vjr2nfbxwbawly8vg9vnpavxbmc1agg2a3cp1ncmzfrgpcx";
|
|
};
|
|
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; {
|
|
description = "Istio configuration command line utility for service operators to debug and diagnose their Istio mesh";
|
|
homepage = "https://istio.io/latest/docs/reference/commands/istioctl";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ veehaitch ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|