From 90a9fdf990ce6053cfeba28db09b762ae43bb816 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 28 Jan 2023 04:20:00 +0000 Subject: [PATCH] algolia-cli: init at 1.2.1 --- .../development/tools/algolia-cli/default.nix | 35 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/tools/algolia-cli/default.nix diff --git a/pkgs/development/tools/algolia-cli/default.nix b/pkgs/development/tools/algolia-cli/default.nix new file mode 100644 index 000000000000..4556b4360d7d --- /dev/null +++ b/pkgs/development/tools/algolia-cli/default.nix @@ -0,0 +1,35 @@ +{ 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 = "Algolia’s official CLI devtool"; + homepage = "https://algolia.com/doc/tools/cli/"; + license = licenses.mit; + maintainers = [ maintainers.marsam ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 763a6e0e62dd..71c7dfd99c2a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5788,6 +5788,8 @@ with pkgs; byzanz = callPackage ../applications/video/byzanz {}; + algolia-cli = callPackage ../development/tools/algolia-cli { }; + anydesk = callPackage ../applications/networking/remote/anydesk { }; anystyle-cli = callPackage ../tools/misc/anystyle-cli { };