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