streamlink: 7.1.1 -> 7.1.2 (#373269)
[NixPkgs.git] / pkgs / by-name / op / opensearch-cli / package.nix
blob7a5c5d40cb7a0acc9d8990546b4592b8ae1271cd
2   lib,
3   buildGoModule,
4   fetchFromGitHub,
5   installShellFiles,
6 }:
8 buildGoModule rec {
9   pname = "opensearch-cli";
10   version = "1.2.0";
11   src = fetchFromGitHub {
12     repo = "opensearch-cli";
13     owner = "opensearch-project";
14     rev = version;
15     hash = "sha256-Ah64a9hpc2tnIXiwxg/slE6fUTAoHv9koNmlUHrVj/s=";
16   };
18   vendorHash = "sha256-r3Bnud8pd0Z9XmGkj9yxRW4U/Ry4U8gvVF4pAdN14lQ=";
20   nativeBuildInputs = [ installShellFiles ];
22   postInstall = ''
23     export HOME="$(mktemp -d)"
24     installShellCompletion --cmd opensearch-cli \
25       --bash <($out/bin/opensearch-cli completion bash) \
26       --zsh <($out/bin/opensearch-cli completion zsh) \
27       --fish <($out/bin/opensearch-cli completion fish)
28   '';
30   meta = {
31     description = "Full-featured command line interface (CLI) for OpenSearch";
32     homepage = "https://github.com/opensearch-project/opensearch-cli";
33     license = lib.licenses.asl20;
34     mainProgram = "opensearch-cli";
35     maintainers = with lib.maintainers; [ shyim ];
36     platforms = lib.platforms.unix;
37     sourceProvenance = with lib.sourceTypes; [ fromSource ];
38   };