nixpkgs/pkgs/development/tools/algolia-cli/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
955 B
Nix
Raw Normal View History

2023-01-28 04:20:00 +00:00
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "algolia-cli";
version = "1.3.0";
2023-01-28 04:20:00 +00:00
src = fetchFromGitHub {
owner = "algolia";
repo = "cli";
rev = "v${version}";
hash = "sha256-j0d2HK4McWA2yP7pt+TUOEYVUOQP4NYOdMlK7IqaAcU=";
2023-01-28 04:20:00 +00:00
};
vendorHash = "sha256-RG/aLlCve0XLj3ljBBSsloFUgNAG6faqjyMYXOo+CgI=";
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 = "Algolias official CLI devtool";
homepage = "https://algolia.com/doc/tools/cli/";
license = licenses.mit;
maintainers = [ maintainers.marsam ];
};
}