Merge pull request #154477 from NelsonJeppesen/glooctl

This commit is contained in:
Sandro 2022-02-10 01:28:22 +01:00 committed by GitHub
commit 00be9c5821
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 0 deletions

View file

@ -0,0 +1,36 @@
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "glooctl";
version = "1.10.6";
src = fetchFromGitHub {
owner = "solo-io";
repo = "gloo";
rev = "v${version}";
sha256 = "sha256-t63tK0hwbVnUP9UxS8g3uzL3rBvKR10vu1E85mNV3E0=";
};
subPackages = [ "projects/gloo/cli/cmd" ];
vendorSha256 = "sha256-IBuAUKbX1esx2p4Q/b3UxQH9S3VVNYZcn5vRKtmhO0A=";
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
mv $out/bin/cmd $out/bin/glooctl
export HOME=$TMP
installShellCompletion --cmd glooctl \
--bash <($out/bin/glooctl completion bash) \
--zsh <($out/bin/glooctl completion zsh)
'';
ldflags = [ "-s" "-w" "-X github.com/solo-io/gloo/pkg/version.Version=${version}" ];
meta = with lib; {
description = "glooctl is the unified CLI for Gloo";
homepage = "https://docs.solo.io/gloo-edge/latest/reference/cli/glooctl/";
license = licenses.asl20;
maintainers = with maintainers; [ nelsonjeppesen ];
};
}

View file

@ -1013,6 +1013,8 @@ with pkgs;
gfshare = callPackage ../tools/security/gfshare { };
glooctl = callPackage ../applications/networking/cluster/glooctl { };
gobgp = callPackage ../tools/networking/gobgp { };
gofu = callPackage ../applications/misc/gofu { };