mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 08:53:21 +00:00
36 lines
955 B
Nix
36 lines
955 B
Nix
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
||
|
||
buildGoModule rec {
|
||
pname = "algolia-cli";
|
||
version = "1.3.1";
|
||
|
||
src = fetchFromGitHub {
|
||
owner = "algolia";
|
||
repo = "cli";
|
||
rev = "v${version}";
|
||
hash = "sha256-lO+ysaXZcwRsuEdkMyPKqrChbW27eId466Eb8Mss2IQ=";
|
||
};
|
||
|
||
vendorHash = "sha256-t8SqCBuE/JmVR71MC9sHtQ6tEovO2UJo7FCDM+IBk+c=";
|
||
|
||
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 ];
|
||
};
|
||
}
|