nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, asynctest
3, aiohttp
4, blinker
5, buildPythonPackage
6, certifi
7, ecs-logging
8, fetchFromGitHub
9, fetchpatch
10, httpx
11, jinja2
12, jsonschema
13, Logbook
14, mock
15, pytest-asyncio
16, pytest-bdd
17, pytest-localserver
18, pytest-mock
19, pytestCheckHook
20, pythonOlder
21, sanic
22, sanic-testing
23, starlette
24, structlog
25, tornado
26, urllib3
27, webob
28}:
29
30buildPythonPackage rec {
31 pname = "elastic-apm";
32 version = "6.9.1";
33 format = "setuptools";
34
35 disabled = pythonOlder "3.8";
36
37 src = fetchFromGitHub {
38 owner = "elastic";
39 repo = "apm-agent-python";
40 rev = "v${version}";
41 sha256 = "sha256-IaCl39rhsFLQwvQdPcqKruV/Mo3f7WH91UVgMG/cnOc=";
42 };
43
44 patches = [
45 (fetchpatch {
46 # fix tests with sanic>=22.3.0
47 url = "https://github.com/elastic/apm-agent-python/commit/114ee6ca998b4d6a5cb075a289af39cb963cf08a.patch";
48 hash = "sha256-M6yEHjThKDCRQOmR0L94KEt8tUun1tPRULI6PNIlE/8=";
49 })
50 ];
51
52 propagatedBuildInputs = [
53 aiohttp
54 blinker
55 certifi
56 sanic
57 starlette
58 tornado
59 urllib3
60 ];
61
62 checkInputs = [
63 asynctest
64 ecs-logging
65 jinja2
66 jsonschema
67 Logbook
68 mock
69 httpx
70 pytest-asyncio
71 pytest-bdd
72 pytest-mock
73 pytest-localserver
74 sanic-testing
75 pytestCheckHook
76 structlog
77 webob
78 ];
79
80 disabledTests = [
81 "elasticapm_client"
82 ];
83
84 disabledTestPaths = [
85 # Exclude tornado tests
86 "tests/contrib/asyncio/tornado/tornado_tests.py"
87 ];
88
89 pythonImportsCheck = [
90 "elasticapm"
91 ];
92
93 meta = with lib; {
94 description = "Python agent for the Elastic APM";
95 homepage = "https://github.com/elastic/apm-agent-python";
96 license = with licenses; [ bsd3 ];
97 maintainers = with maintainers; [ fab ];
98 };
99}