Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
49 lines
1.1 KiB
Nix
49 lines
1.1 KiB
Nix
{
|
||
lib,
|
||
stdenv,
|
||
buildGoModule,
|
||
fetchFromGitHub,
|
||
installShellFiles,
|
||
}:
|
||
let
|
||
version = "1.7.1";
|
||
in
|
||
buildGoModule {
|
||
pname = "algolia-cli";
|
||
inherit version;
|
||
|
||
src = fetchFromGitHub {
|
||
owner = "algolia";
|
||
repo = "cli";
|
||
tag = "v${version}";
|
||
hash = "sha256-XaPod/8MwucNXzTfMkF2Sr8i8U5RKJs/RfBxDjJK4vU=";
|
||
};
|
||
|
||
vendorHash = "sha256-zDhsJ9iUKm0RzALVlvZDIPYaTqfIDIuUWAU+h5gp4Es=";
|
||
|
||
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 = "Algolia’s official CLI devtool";
|
||
mainProgram = "algolia";
|
||
homepage = "https://algolia.com/doc/tools/cli/";
|
||
license = lib.licenses.mit;
|
||
maintainers = with lib.maintainers; [ momeemt ];
|
||
};
|
||
}
|