Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 51 lines 1.2 kB view raw
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 installShellFiles, 6}: 7 8buildGoModule rec { 9 pname = "glooctl"; 10 version = "1.19.4"; 11 12 src = fetchFromGitHub { 13 owner = "solo-io"; 14 repo = "gloo"; 15 rev = "v${version}"; 16 hash = "sha256-6esnWLO0+6Tst8eplemgs1Z2Ibk+D3ipFHxcBWF3/6w="; 17 }; 18 19 vendorHash = "sha256-n42H8c4KqgEannLpEdpKSz7J4UZ+lpVhDAE7ZuBKdCU="; 20 21 subPackages = [ "projects/gloo/cli/cmd" ]; 22 23 nativeBuildInputs = [ installShellFiles ]; 24 25 strictDeps = true; 26 27 ldflags = [ 28 "-s" 29 "-X github.com/solo-io/gloo/pkg/version.Version=${version}" 30 ]; 31 32 preCheck = '' 33 export HOME=$TMPDIR 34 ''; 35 36 postInstall = '' 37 mv $out/bin/cmd $out/bin/glooctl 38 installShellCompletion --cmd glooctl \ 39 --bash <($out/bin/glooctl completion bash) \ 40 --zsh <($out/bin/glooctl completion zsh) 41 ''; 42 43 meta = { 44 description = "Unified CLI for Gloo, the feature-rich, Kubernetes-native, next-generation API gateway built on Envoy"; 45 mainProgram = "glooctl"; 46 homepage = "https://docs.solo.io/gloo-edge/latest/reference/cli/glooctl/"; 47 changelog = "https://github.com/solo-io/gloo/releases/tag/v${version}"; 48 license = lib.licenses.asl20; 49 maintainers = [ ]; 50 }; 51}