mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-10 06:55:10 +00:00
46 lines
1018 B
Nix
46 lines
1018 B
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "glooctl";
|
|
version = "1.15.18";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "solo-io";
|
|
repo = "gloo";
|
|
rev = "v${version}";
|
|
hash = "sha256-oHwo0I3OFfilLg2tlL0EycTo6BC7LYbzg7dxgfz/XeI=";
|
|
};
|
|
|
|
vendorHash = "sha256-MrTiZCvYUmdX4sK85jeeQpUupvitH6PfbQ+RfwELaV4=";
|
|
|
|
subPackages = [ "projects/gloo/cli/cmd" ];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
strictDeps = true;
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X github.com/solo-io/gloo/pkg/version.Version=${version}"
|
|
];
|
|
|
|
postInstall = ''
|
|
mv $out/bin/cmd $out/bin/glooctl
|
|
installShellCompletion --cmd glooctl \
|
|
--bash <($out/bin/glooctl completion bash) \
|
|
--zsh <($out/bin/glooctl completion zsh)
|
|
'';
|
|
|
|
meta = {
|
|
description = "glooctl is the unified CLI for Gloo";
|
|
homepage = "https://docs.solo.io/gloo-edge/latest/reference/cli/glooctl/";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ ];
|
|
};
|
|
}
|