2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
aiohttp,
|
|
|
|
blinker,
|
|
|
|
buildPythonPackage,
|
|
|
|
certifi,
|
|
|
|
ecs-logging,
|
|
|
|
fetchFromGitHub,
|
|
|
|
httpx,
|
|
|
|
jinja2,
|
|
|
|
jsonschema,
|
|
|
|
logbook,
|
|
|
|
mock,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-bdd,
|
|
|
|
pytest-localserver,
|
|
|
|
pytest-mock,
|
|
|
|
pytest-random-order,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
pythonRelaxDepsHook,
|
|
|
|
sanic,
|
|
|
|
sanic-testing,
|
|
|
|
setuptools,
|
|
|
|
starlette,
|
|
|
|
structlog,
|
|
|
|
tornado,
|
|
|
|
urllib3,
|
|
|
|
webob,
|
|
|
|
wrapt,
|
2021-12-19 01:06:50 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "elastic-apm";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "6.22.2";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "elastic";
|
|
|
|
repo = "apm-agent-python";
|
2022-09-09 14:08:57 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-AHKF+o0iZ+c1JFq3lL5XdHBDAae9qTR1OJvwuUVsaeU=";
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonRelaxDeps = [ "wrapt" ];
|
|
|
|
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pythonRelaxDepsHook ];
|
|
|
|
|
|
|
|
dependencies = [
|
2021-12-19 01:06:50 +00:00
|
|
|
aiohttp
|
|
|
|
blinker
|
|
|
|
certifi
|
|
|
|
sanic
|
|
|
|
starlette
|
|
|
|
tornado
|
|
|
|
urllib3
|
2022-12-02 08:20:57 +00:00
|
|
|
wrapt
|
2021-12-19 01:06:50 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-19 01:06:50 +00:00
|
|
|
ecs-logging
|
2023-02-22 10:55:15 +00:00
|
|
|
httpx
|
2021-12-19 01:06:50 +00:00
|
|
|
jinja2
|
|
|
|
jsonschema
|
2023-03-15 16:39:30 +00:00
|
|
|
logbook
|
2021-12-19 01:06:50 +00:00
|
|
|
mock
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-bdd
|
|
|
|
pytest-localserver
|
2023-02-22 10:55:15 +00:00
|
|
|
pytest-mock
|
2023-02-02 18:25:31 +00:00
|
|
|
pytest-random-order
|
2023-02-22 10:55:15 +00:00
|
|
|
pytestCheckHook
|
2021-12-19 01:06:50 +00:00
|
|
|
sanic-testing
|
|
|
|
structlog
|
|
|
|
webob
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabledTests = [ "elasticapm_client" ];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabledTestPaths =
|
|
|
|
[
|
|
|
|
# Exclude tornado tests
|
|
|
|
"tests/contrib/asyncio/tornado/tornado_tests.py"
|
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.isDarwin [
|
|
|
|
# Flaky tests on Darwin
|
|
|
|
"tests/utils/threading_tests.py"
|
|
|
|
];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "elasticapm" ];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python agent for the Elastic APM";
|
|
|
|
homepage = "https://github.com/elastic/apm-agent-python";
|
2022-12-02 08:20:57 +00:00
|
|
|
changelog = "https://github.com/elastic/apm-agent-python/releases/tag/v${version}";
|
2021-12-19 01:06:50 +00:00
|
|
|
license = with licenses; [ bsd3 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2023-05-24 13:37:59 +00:00
|
|
|
mainProgram = "elasticapm-run";
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
}
|