1{ rustPlatform
2, fetchFromGitHub
3, lib
4, installShellFiles
5, openssl
6, pkg-config
7, stdenv
8, CoreServices
9, Security
10, SystemConfiguration
11}:
12rustPlatform.buildRustPackage rec {
13 pname = "sentry-cli";
14 version = "2.31.2";
15
16 src = fetchFromGitHub {
17 owner = "getsentry";
18 repo = "sentry-cli";
19 rev = version;
20 sha256 = "sha256-UL8PJnz+fV67F0t24OEReF4tIUa8S2NzICYgUU7fgUo=";
21 };
22 doCheck = false;
23
24 # Needed to get openssl-sys to use pkgconfig.
25 OPENSSL_NO_VENDOR = 1;
26
27 buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ CoreServices Security SystemConfiguration ];
28 nativeBuildInputs = [ installShellFiles pkg-config ];
29
30 cargoHash = "sha256-S1NwnPn3PRL6GoRBFEhhNuy9StrAhG5qCDW2uWNyU4E=";
31
32 postInstall = ''
33 installShellCompletion --cmd sentry-cli \
34 --bash <($out/bin/sentry-cli completions bash) \
35 --fish <($out/bin/sentry-cli completions fish) \
36 --zsh <($out/bin/sentry-cli completions zsh)
37 '';
38
39 meta = with lib; {
40 homepage = "https://docs.sentry.io/cli/";
41 license = licenses.bsd3;
42 description = "A command line utility to work with Sentry";
43 mainProgram = "sentry-cli";
44 changelog = "https://github.com/getsentry/sentry-cli/raw/${version}/CHANGELOG.md";
45 maintainers = with maintainers; [ rizary ];
46 };
47}