Merge pull request #279587 from loewenheim/sentry-cli-shell-completions

sentry-cli: Enable shell completions
This commit is contained in:
Janne Heß 2024-02-28 13:04:47 +01:00 committed by GitHub
commit 2fed6e1f25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,7 @@
{ rustPlatform
, fetchFromGitHub
, lib
, installShellFiles
, openssl
, pkg-config
, stdenv
@ -24,10 +25,17 @@ rustPlatform.buildRustPackage rec {
OPENSSL_NO_VENDOR = 1;
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ CoreServices Security SystemConfiguration ];
nativeBuildInputs = [ pkg-config ];
nativeBuildInputs = [ installShellFiles pkg-config ];
cargoHash = "sha256-MChhtWbwi5/1GMXxlKov8LrO+kp7D6u4u1lmEjZvyP8=";
postInstall = ''
installShellCompletion --cmd sentry-cli \
--bash <($out/bin/sentry-cli completions bash) \
--fish <($out/bin/sentry-cli completions fish) \
--zsh <($out/bin/sentry-cli completions zsh)
'';
meta = with lib; {
homepage = "https://docs.sentry.io/cli/";
license = licenses.bsd3;