mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 23:23:07 +00:00
37 lines
1016 B
Nix
37 lines
1016 B
Nix
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
buildGoModule rec {
|
|
pname = "glooctl";
|
|
version = "1.13.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "solo-io";
|
|
repo = "gloo";
|
|
rev = "v${version}";
|
|
hash = "sha256-sCtRNdQRSPpIBSwtQMoetKmFLYUe3w1esogdkLqTHbk=";
|
|
};
|
|
|
|
subPackages = [ "projects/gloo/cli/cmd" ];
|
|
vendorHash = "sha256-Lpc/fzOJLIyI2O5DP8K/LBYg6ZA1ixristercAM5VUQ=";
|
|
|
|
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 ];
|
|
};
|
|
}
|