Files
nixpkgs/pkgs/by-name/is/istioctl/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

64 lines
1.5 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule rec {
pname = "istioctl";
version = "1.27.1";
src = fetchFromGitHub {
owner = "istio";
repo = "istio";
rev = version;
hash = "sha256-APUhW1PoNmfnbScoeVbsFY1R9jJT4wABpOjxtY5fFVc=";
};
vendorHash = "sha256-+dlZAO6odRCbsqm5Q172g4OMs9S4ovekajAoseHYZ94=";
nativeBuildInputs = [ installShellFiles ];
# Bundle release metadata
ldflags =
let
attrs = [
"istio.io/istio/pkg/version.buildVersion=${version}"
"istio.io/istio/pkg/version.buildStatus=Nix"
"istio.io/istio/pkg/version.buildTag=${version}"
"istio.io/istio/pkg/version.buildHub=docker.io/istio"
];
in
[
"-s"
"-w"
"${lib.concatMapStringsSep " " (attr: "-X ${attr}") attrs}"
];
subPackages = [ "istioctl/cmd/istioctl" ];
doInstallCheck = true;
installCheckPhase = ''
$out/bin/istioctl version --remote=false | grep ${version} > /dev/null
'';
postInstall = ''
$out/bin/istioctl collateral --man --bash --zsh
installManPage *.1
installShellCompletion istioctl.bash
installShellCompletion --zsh _istioctl
'';
meta = with lib; {
description = "Istio configuration command line utility for service operators to debug and diagnose their Istio mesh";
mainProgram = "istioctl";
homepage = "https://istio.io/latest/docs/reference/commands/istioctl";
license = licenses.asl20;
maintainers = with maintainers; [
bryanasdev000
veehaitch
ryan4yin
];
};
}