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