diff options
author | Laurens Duijvesteijn <laurens@channable.com> | 2019-12-05 10:24:33 +0100 |
---|---|---|
committer | Laurens Duijvesteijn <laurens@channable.com> | 2019-12-07 12:01:40 +0100 |
commit | 87af0c71b7d4855882df4be036f3b4b948e33257 (patch) | |
tree | 24367f6b1ed77e8a571678cf6a87e7fed8d34e7d /pkgs/development/python-modules/sentry-sdk | |
parent | 4d9ccae6324153f5fda641db6f52d8d68a4c6186 (diff) | |
download | nixpkgs-87af0c71b7d4855882df4be036f3b4b948e33257.tar nixpkgs-87af0c71b7d4855882df4be036f3b4b948e33257.tar.gz nixpkgs-87af0c71b7d4855882df4be036f3b4b948e33257.tar.bz2 nixpkgs-87af0c71b7d4855882df4be036f3b4b948e33257.tar.lz nixpkgs-87af0c71b7d4855882df4be036f3b4b948e33257.tar.xz nixpkgs-87af0c71b7d4855882df4be036f3b4b948e33257.tar.zst nixpkgs-87af0c71b7d4855882df4be036f3b4b948e33257.zip |
pythonPackages.sentry-sdk: Fix the test suite
This package could not build because the tests require /etc/protocols. Therefore, make this file available using libredirect.
Diffstat (limited to 'pkgs/development/python-modules/sentry-sdk')
-rw-r--r-- | pkgs/development/python-modules/sentry-sdk/default.nix | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/sentry-sdk/default.nix b/pkgs/development/python-modules/sentry-sdk/default.nix index da729f5ab0b..daba816cfdb 100644 --- a/pkgs/development/python-modules/sentry-sdk/default.nix +++ b/pkgs/development/python-modules/sentry-sdk/default.nix @@ -1,4 +1,22 @@ -{ stdenv, buildPythonPackage, fetchPypi, isPy3k, urllib3, certifi, django, flask, tornado, bottle, rq, falcon, celery, pyramid, sanic, aiohttp }: +{ aiohttp +, bottle +, buildPythonPackage +, celery +, certifi +, django +, falcon +, fetchPypi +, flask +, iana-etc +, isPy3k +, libredirect +, pyramid +, rq +, sanic +, stdenv +, tornado +, urllib3 +}: buildPythonPackage rec { pname = "sentry-sdk"; @@ -20,4 +38,14 @@ buildPythonPackage rec { license = licenses.bsd2; maintainers = with maintainers; [ gebner ]; }; + + # 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"; } |