Files
Marcin Serwin c1b9d04d9c maintainers: drop momeemt
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
2026-06-04 12:05:36 +02:00

49 lines
1.1 KiB
Nix
Raw Permalink 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,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
let
version = "1.8.4";
in
buildGoModule {
pname = "algolia-cli";
inherit version;
src = fetchFromGitHub {
owner = "algolia";
repo = "cli";
tag = "v${version}";
hash = "sha256-ltr31AnZPTtnfMWaUtsswUnIOXfR76X8pjM9D0uiLJo=";
};
vendorHash = "sha256-WdNuwUz64IZq3gfvFhXX536/tZ/67Ki0xiqIj7sLSEM=";
nativeBuildInputs = [ installShellFiles ];
subPackages = [ "cmd/algolia" ];
ldflags = [
"-s"
"-w"
"-X github.com/algolia/cli/pkg/version.Version=${version}"
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd algolia \
--bash <($out/bin/algolia completion bash) \
--fish <($out/bin/algolia completion fish) \
--zsh <($out/bin/algolia completion zsh)
'';
meta = {
description = "Algolias official CLI devtool";
mainProgram = "algolia";
homepage = "https://algolia.com/doc/tools/cli/";
license = lib.licenses.mit;
maintainers = [ ];
};
}