2019-12-05 09:24:33 +00:00
|
|
|
{ aiohttp
|
|
|
|
, bottle
|
|
|
|
, buildPythonPackage
|
|
|
|
, celery
|
|
|
|
, certifi
|
|
|
|
, django
|
|
|
|
, falcon
|
|
|
|
, fetchPypi
|
|
|
|
, flask
|
|
|
|
, iana-etc
|
|
|
|
, isPy3k
|
|
|
|
, libredirect
|
|
|
|
, pyramid
|
|
|
|
, rq
|
|
|
|
, sanic
|
|
|
|
, stdenv
|
|
|
|
, tornado
|
|
|
|
, urllib3
|
|
|
|
}:
|
2019-05-30 14:25:13 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sentry-sdk";
|
2019-11-11 11:13:41 +00:00
|
|
|
version = "0.13.2";
|
2019-05-30 14:25:13 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-11-11 11:13:41 +00:00
|
|
|
sha256 = "ff1fa7fb85703ae9414c8b427ee73f8363232767c9cd19158f08f6e4f0b58fc7";
|
2019-05-30 14:25:13 +01:00
|
|
|
};
|
|
|
|
|
2019-10-28 07:17:50 +00:00
|
|
|
checkInputs = [ django flask tornado bottle rq falcon ]
|
|
|
|
++ stdenv.lib.optionals isPy3k [ celery pyramid sanic aiohttp ];
|
2019-09-20 10:03:18 +01:00
|
|
|
|
2019-05-30 14:25:13 +01:00
|
|
|
propagatedBuildInputs = [ urllib3 certifi ];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://github.com/getsentry/sentry-python";
|
|
|
|
description = "New Python SDK for Sentry.io";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ gebner ];
|
|
|
|
};
|
2019-12-05 09:24:33 +00:00
|
|
|
|
|
|
|
# The Sentry tests need access to `/etc/protocols` (the tests call
|
|
|
|
# `socket.getprotobyname('tcp')`, which reads from this file). Normally
|
|
|
|
# this path isn't available in the sandbox. Therefore, use libredirect
|
|
|
|
# to make on eavailable from `iana-etc`. This is a test-only operation.
|
|
|
|
preCheck = ''
|
|
|
|
export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols
|
|
|
|
export LD_PRELOAD=${libredirect}/lib/libredirect.so
|
|
|
|
'';
|
|
|
|
postCheck = "unset NIX_REDIRECTS LD_PRELOAD";
|
2019-05-30 14:25:13 +01:00
|
|
|
}
|