Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 aiohttp, 5 blinker, 6 buildPythonPackage, 7 certifi, 8 ecs-logging, 9 fetchFromGitHub, 10 httpx, 11 jinja2, 12 jsonschema, 13 logbook, 14 mock, 15 pytest-asyncio, 16 pytest-bdd, 17 pytest-localserver, 18 pytest-mock, 19 pytest-random-order, 20 pytestCheckHook, 21 pythonOlder, 22 sanic, 23 sanic-testing, 24 setuptools, 25 starlette, 26 structlog, 27 tornado, 28 urllib3, 29 webob, 30 wrapt, 31}: 32 33buildPythonPackage rec { 34 pname = "elastic-apm"; 35 version = "6.22.3"; 36 pyproject = true; 37 38 disabled = pythonOlder "3.8"; 39 40 src = fetchFromGitHub { 41 owner = "elastic"; 42 repo = "apm-agent-python"; 43 rev = "refs/tags/v${version}"; 44 hash = "sha256-nA+c2ycSVVJyfcNcj5W7Z2VSVcCzyCtoi3B/T4QZWnw="; 45 }; 46 47 pythonRelaxDeps = [ "wrapt" ]; 48 49 build-system = [ setuptools ]; 50 51 52 dependencies = [ 53 aiohttp 54 blinker 55 certifi 56 sanic 57 starlette 58 tornado 59 urllib3 60 wrapt 61 ]; 62 63 nativeCheckInputs = [ 64 ecs-logging 65 httpx 66 jinja2 67 jsonschema 68 logbook 69 mock 70 pytest-asyncio 71 pytest-bdd 72 pytest-localserver 73 pytest-mock 74 pytest-random-order 75 pytestCheckHook 76 sanic-testing 77 structlog 78 webob 79 ]; 80 81 disabledTests = [ "elasticapm_client" ]; 82 83 disabledTestPaths = 84 [ 85 # Exclude tornado tests 86 "tests/contrib/asyncio/tornado/tornado_tests.py" 87 ] 88 ++ lib.optionals stdenv.isDarwin [ 89 # Flaky tests on Darwin 90 "tests/utils/threading_tests.py" 91 ]; 92 93 pythonImportsCheck = [ "elasticapm" ]; 94 95 meta = with lib; { 96 description = "Python agent for the Elastic APM"; 97 homepage = "https://github.com/elastic/apm-agent-python"; 98 changelog = "https://github.com/elastic/apm-agent-python/releases/tag/v${version}"; 99 license = with licenses; [ bsd3 ]; 100 maintainers = with maintainers; [ fab ]; 101 mainProgram = "elasticapm-run"; 102 }; 103}