mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-30 17:43:42 +00:00
37 lines
1017 B
Nix
37 lines
1017 B
Nix
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
buildGoModule rec {
|
|
pname = "glooctl";
|
|
version = "1.14.12";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "solo-io";
|
|
repo = "gloo";
|
|
rev = "v${version}";
|
|
hash = "sha256-0ZrR3y3bTXLCOgN+c96lEfNnT+GKXeEBHifM9jfWTBI=";
|
|
};
|
|
|
|
subPackages = [ "projects/gloo/cli/cmd" ];
|
|
vendorHash = "sha256-2DKRF68dNkFgSeGqI68j2knnGVfVxo0UvGD7YvPwx4M=";
|
|
|
|
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 ];
|
|
};
|
|
}
|