1{ aiohttp
2, blinker
3, botocore
4, bottle
5, buildPythonPackage
6, celery
7, certifi
8, chalice
9, django
10, falcon
11, fetchPypi
12, flask
13, iana-etc
14, isPy3k
15, libredirect
16, pyramid
17, rq
18, sanic
19, sqlalchemy
20, lib
21, tornado
22, urllib3
23, trytond
24, werkzeug
25, executing
26, pure-eval
27, asttokens
28}:
29
30buildPythonPackage rec {
31 pname = "sentry-sdk";
32 version = "1.4.3";
33
34 src = fetchPypi {
35 inherit pname version;
36 sha256 = "b9844751e40710e84a457c5bc29b21c383ccb2b63d76eeaad72f7f1c808c8828";
37 };
38
39 checkInputs = [ blinker botocore chalice django flask tornado bottle rq falcon sqlalchemy werkzeug trytond
40 executing pure-eval asttokens ]
41 ++ lib.optionals isPy3k [ celery pyramid sanic aiohttp ];
42
43 propagatedBuildInputs = [ urllib3 certifi ];
44
45
46 # The Sentry tests need access to `/etc/protocols` (the tests call
47 # `socket.getprotobyname('tcp')`, which reads from this file). Normally
48 # this path isn't available in the sandbox. Therefore, use libredirect
49 # to make on eavailable from `iana-etc`. This is a test-only operation.
50 preCheck = lib.optionalString doCheck ''
51 export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols
52 export LD_PRELOAD=${libredirect}/lib/libredirect.so
53 '';
54
55 postCheck = "unset NIX_REDIRECTS LD_PRELOAD";
56
57 # no tests
58 doCheck = false;
59 pythonImportsCheck = [ "sentry_sdk" ];
60
61 meta = with lib; {
62 homepage = "https://github.com/getsentry/sentry-python";
63 description = "New Python SDK for Sentry.io";
64 license = licenses.bsd2;
65 maintainers = with maintainers; [ gebner ];
66 };
67}