nixpkgs/pkgs/development/tools/sentry-cli/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

48 lines
1.3 KiB
Nix

{ rustPlatform
, fetchFromGitHub
, lib
, installShellFiles
, openssl
, pkg-config
, stdenv
, CoreServices
, Security
, SystemConfiguration
}:
rustPlatform.buildRustPackage rec {
pname = "sentry-cli";
version = "2.30.2";
src = fetchFromGitHub {
owner = "getsentry";
repo = "sentry-cli";
rev = version;
sha256 = "sha256-ThZb6/Mprz9qgEGsJ+EbENvjmgehDsjVgFGBq4PZMRM=";
};
doCheck = false;
# Needed to get openssl-sys to use pkgconfig.
OPENSSL_NO_VENDOR = 1;
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ CoreServices Security SystemConfiguration ];
nativeBuildInputs = [ installShellFiles pkg-config ];
cargoHash = "sha256-yoBoPk5PvMLGvhU/kg+WwO5WgwEnfKQlnkCC6IctfAI=";
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;
description = "A command line utility to work with Sentry";
mainProgram = "sentry-cli";
changelog = "https://github.com/getsentry/sentry-cli/raw/${version}/CHANGELOG.md";
maintainers = with maintainers; [ rizary loewenheim ];
};
}