blob: 91627366b6e30277d33cf67c856cfec2409861a1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "glooctl";
version = "1.14.2";
src = fetchFromGitHub {
owner = "solo-io";
repo = "gloo";
rev = "v${version}";
hash = "sha256-g/gn08Mpwocf5SBJu93bMNiAlg9osIWUy0skV3JzmMk=";
};
subPackages = [ "projects/gloo/cli/cmd" ];
vendorHash = "sha256-z1am0HfRrPAg2H7ZAjinoirfmaCFdF1oavVVVKQ3V8o=";
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 ];
};
}
|