Files
nixpkgs/pkgs/by-name/gl/glooctl/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

55 lines
1.3 KiB
Nix

{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule rec {
pname = "glooctl";
version = "1.20.1";
src = fetchFromGitHub {
owner = "solo-io";
repo = "gloo";
rev = "v${version}";
hash = "sha256-jSF2B9dbyJ9S4PHt6CKANC40MgXIuVF3uh4Ze0F0jZU=";
};
vendorHash = "sha256-zJmp3UWzZSI7G54DTOEOEo2ZIKjM6GZ0Cf5/BukaB4o=";
subPackages = [ "projects/gloo/cli/cmd" ];
nativeBuildInputs = [ installShellFiles ];
strictDeps = true;
ldflags = [
"-s"
"-X github.com/solo-io/gloo/pkg/version.Version=${version}"
];
preCheck = ''
export HOME=$TMPDIR
'';
postInstall = ''
mv $out/bin/cmd $out/bin/glooctl
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd glooctl \
--bash <($out/bin/glooctl completion bash) \
--zsh <($out/bin/glooctl completion zsh)
'';
meta = {
description = "Unified CLI for Gloo, the feature-rich, Kubernetes-native, next-generation API gateway built on Envoy";
mainProgram = "glooctl";
homepage = "https://docs.solo.io/gloo-edge/latest/reference/cli/glooctl/";
changelog = "https://github.com/solo-io/gloo/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = [ ];
};
}