depot/third_party/nixpkgs/pkgs/development/tools/algolia-cli/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

35 lines
955 B
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "algolia-cli";
version = "1.2.1";
src = fetchFromGitHub {
owner = "algolia";
repo = "cli";
rev = "v${version}";
hash = "sha256-rmxLbxotATyURRcG9ryWCDHkH7a/bop/BCDQAoQjXSo=";
};
vendorHash = "sha256-iG8g7mBbIulKSxc1a3/fOBOCWoFYaB5FLwJPNKJRZDg=";
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 ];
};
}