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