2023-01-28 04:20:00 +00:00
|
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
|
pname = "algolia-cli";
|
2023-04-29 11:43:30 +00:00
|
|
|
|
version = "1.3.6";
|
2023-01-28 04:20:00 +00:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "algolia";
|
|
|
|
|
repo = "cli";
|
|
|
|
|
rev = "v${version}";
|
2023-04-29 11:43:30 +00:00
|
|
|
|
hash = "sha256-SNQhDmiRz0J3MlJbYUAQgiXeLv3oZVAMnavkAeRrnEA=";
|
2023-01-28 04:20:00 +00:00
|
|
|
|
};
|
|
|
|
|
|
2023-04-18 01:41:08 +00:00
|
|
|
|
vendorHash = "sha256-QgNL7pp0KH1RUV69BFVtHpaLHrPp4UQhEtOEiRmfAi0=";
|
2023-01-28 04:20:00 +00:00
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
|
|
subPackages = [ "cmd/algolia" ];
|
|
|
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" "-X github.com/algolia/cli/pkg/version.Version=${version}" ];
|
|
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
|
installShellCompletion --cmd algolia \
|
|
|
|
|
--bash <($out/bin/algolia completion bash) \
|
|
|
|
|
--fish <($out/bin/algolia completion fish) \
|
|
|
|
|
--zsh <($out/bin/algolia completion zsh)
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
|
description = "Algolia’s official CLI devtool";
|
|
|
|
|
homepage = "https://algolia.com/doc/tools/cli/";
|
|
|
|
|
license = licenses.mit;
|
|
|
|
|
maintainers = [ maintainers.marsam ];
|
|
|
|
|
};
|
|
|
|
|
}
|