git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #150451 from fabaff/elastic-apm

python3Packages.elastic-apm: init at 6.7.2

commit4247c4a76c18659f9e55c0972e17191497bf4321 authorFabian Affolter <fabian@affolter-engineering.ch> dateMon 13 Dec 2021, 12:06 (5 years ago) parent7796f4783433b8
3 files changed+134
pkgs/development/python-modules/ecs-logging/default.nix+40 pkgs/development/python-modules/elastic-apm/default.nix+90 pkgs/top-level/python-packages.nix+4
pkgs/development/python-modules/ecs-logging/default.nixnew file+40
@@ -0,0 +1,40 @@
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, flit-core
5+, pytestCheckHook
6+, pythonOlder
7+}:
8+
9+buildPythonPackage rec {
10+ pname = "ecs-logging";
11+ version = "1.1.0";
12+ format = "flit";
13+
14+ disabled = pythonOlder "3.8";
15+
16+ src = fetchFromGitHub {
17+ owner = "elastic";
18+ repo = "ecs-logging-python";
19+ rev = version;
20+ sha256 = "sha256-UcQh/+K2d4tiMZaz4IAZ2w/B88vEkHoq2LCPMNZ95Mo=";
21+ };
22+
23+ nativeBuildInputs = [
24+ flit-core
25+ ];
26+
27+ # Circular dependency elastic-apm
28+ doCheck = false;
29+
30+ pythonImportsCheck = [
31+ "ecs_logging"
32+ ];
33+
34+ meta = with lib; {
35+ description = "Logging formatters for the Elastic Common Schema (ECS) in Python";
36+ homepage = "https://github.com/elastic/ecs-logging-python";
37+ license = with licenses; [ asl20 ];
38+ maintainers = with maintainers; [ fab ];
39+ };
40+}
pkgs/development/python-modules/elastic-apm/default.nixnew file+90
@@ -0,0 +1,90 @@
1+{ lib
2+, asynctest
3+, aiohttp
4+, blinker
5+, buildPythonPackage
6+, certifi
7+, ecs-logging
8+, fetchFromGitHub
9+, httpx
10+, jinja2
11+, jsonschema
12+, Logbook
13+, mock
14+, pytest-asyncio
15+, pytest-bdd
16+, pytest-localserver
17+, pytest-mock
18+, pytestCheckHook
19+, pythonOlder
20+, sanic
21+, sanic-testing
22+, starlette
23+, structlog
24+, tornado
25+, urllib3
26+, webob
27+}:
28+
29+buildPythonPackage rec {
30+ pname = "elastic-apm";
31+ version = "6.7.2";
32+ format = "setuptools";
33+
34+ disabled = pythonOlder "3.8";
35+
36+ src = fetchFromGitHub {
37+ owner = "elastic";
38+ repo = "apm-agent-python";
39+ rev = "v${version}";
40+ sha256 = "sha256-NyoFJ3HVxE3AdCCZCZrEk4dDiTIv9cGZYPHVre/PMO4=";
41+ };
42+
43+ propagatedBuildInputs = [
44+ aiohttp
45+ blinker
46+ certifi
47+ sanic
48+ starlette
49+ tornado
50+ urllib3
51+ ];
52+
53+ checkInputs = [
54+ asynctest
55+ ecs-logging
56+ jinja2
57+ jsonschema
58+ Logbook
59+ mock
60+ httpx
61+ pytest-asyncio
62+ pytest-bdd
63+ pytest-mock
64+ pytest-localserver
65+ sanic-testing
66+ pytestCheckHook
67+ structlog
68+ webob
69+ ];
70+
71+ disabledTests = [
72+ "elasticapm_client"
73+ ];
74+
75+ disabledTestPaths = [
76+ # Exclude tornado tests
77+ "tests/contrib/asyncio/tornado/tornado_tests.py"
78+ ];
79+
80+ pythonImportsCheck = [
81+ "elasticapm"
82+ ];
83+
84+ meta = with lib; {
85+ description = "Python agent for the Elastic APM";
86+ homepage = "https://github.com/elastic/apm-agent-python";
87+ license = with licenses; [ bsd3 ];
88+ maintainers = with maintainers; [ fab ];
89+ };
90+}
pkgs/top-level/python-packages.nix+4
@@ -2438,6 +2438,8 @@ in {
24382438
24392439 ecpy = callPackage ../development/python-modules/ecpy { };
24402440
2441+ ecs-logging = callPackage ../development/python-modules/ecs-logging { };
2442+
24412443 ed25519 = callPackage ../development/python-modules/ed25519 { };
24422444
24432445 editables = callPackage ../development/python-modules/editables { };
@@ -2462,6 +2464,8 @@ in {
24622464
24632465 elkm1-lib = callPackage ../development/python-modules/elkm1-lib { };
24642466
2467+ elastic-apm = callPackage ../development/python-modules/elastic-apm { };
2468+
24652469 elasticsearch = callPackage ../development/python-modules/elasticsearch { };
24662470
24672471 elasticsearch-dsl = callPackage ../development/python-modules/elasticsearch-dsl { };