PageRenderTime 26ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 1ms

/pkgs/development/python-modules/sentry-sdk/default.nix

https://codeberg.org/matthiasbeyer/nixpkgs
Nix | 52 lines | 46 code | 6 blank | 0 comment | 0 complexity | 4946dcfc754564733f85cf25669cc85d MD5 | raw file
  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. }:
  21. buildPythonPackage rec {
  22. pname = "sentry-sdk";
  23. version = "0.13.5";
  24. src = fetchPypi {
  25. inherit pname version;
  26. sha256 = "c6b919623e488134a728f16326c6f0bcdab7e3f59e7f4c472a90eea4d6d8fe82";
  27. };
  28. checkInputs = [ django flask tornado bottle rq falcon sqlalchemy ]
  29. ++ stdenv.lib.optionals isPy3k [ celery pyramid sanic aiohttp ];
  30. propagatedBuildInputs = [ urllib3 certifi ];
  31. meta = with stdenv.lib; {
  32. homepage = "https://github.com/getsentry/sentry-python";
  33. description = "New Python SDK for Sentry.io";
  34. license = licenses.bsd2;
  35. maintainers = with maintainers; [ gebner ];
  36. };
  37. # The Sentry tests need access to `/etc/protocols` (the tests call
  38. # `socket.getprotobyname('tcp')`, which reads from this file). Normally
  39. # this path isn't available in the sandbox. Therefore, use libredirect
  40. # to make on eavailable from `iana-etc`. This is a test-only operation.
  41. preCheck = ''
  42. export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols
  43. export LD_PRELOAD=${libredirect}/lib/libredirect.so
  44. '';
  45. postCheck = "unset NIX_REDIRECTS LD_PRELOAD";
  46. }