nixpkgs/pkgs/development/tools/algolia-cli/default.nix
2024-04-29 12:53:40 +00:00

37 lines
965 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.6.8";
src = fetchFromGitHub {
owner = "algolia";
repo = "cli";
rev = "v${version}";
hash = "sha256-PqiFx1Bzv4cYwnlr1BDPGiumUUneT5sq64eFFcYPmaA=";
};
vendorHash = "sha256-cNuBTH7L2K4TgD0H9FZ9CjhE5AGXADaniGLD9Lhrtrk=";
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";
mainProgram = "algolia";
homepage = "https://algolia.com/doc/tools/cli/";
license = licenses.mit;
maintainers = [ ];
};
}