Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 39 lines 1.1 kB view raw
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 installShellFiles, 6}: 7 8buildGoModule 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 }; 17 18 vendorHash = "sha256-r3Bnud8pd0Z9XmGkj9yxRW4U/Ry4U8gvVF4pAdN14lQ="; 19 20 nativeBuildInputs = [ installShellFiles ]; 21 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 ''; 29 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 }; 39}