1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 hatch-vcs,
7 hatchling,
8 prometheus-client,
9 pytest-asyncio,
10 pytestCheckHook,
11 twisted,
12 typing-extensions,
13 wrapt,
14}:
15
16buildPythonPackage rec {
17 pname = "prometheus-async";
18 version = "25.1.0";
19 pyproject = true;
20
21 src = fetchFromGitHub {
22 owner = "hynek";
23 repo = "prometheus-async";
24 rev = version;
25 hash = "sha256-e/BVxATpafxddq26Rt7XTiK4ajY+saUApXbmTG0/I6I=";
26 };
27
28 build-system = [
29 hatch-vcs
30 hatchling
31 ];
32
33 dependencies = [
34 prometheus-client
35 typing-extensions
36 wrapt
37 ];
38
39 optional-dependencies = {
40 aiohttp = [ aiohttp ];
41 consul = [ aiohttp ];
42 twisted = [ twisted ];
43 };
44
45 nativeCheckInputs = [
46 pytestCheckHook
47 pytest-asyncio
48 ];
49
50 pythonImportsCheck = [ "prometheus_async" ];
51
52 meta = with lib; {
53 description = "Async helpers for prometheus_client";
54 homepage = "https://github.com/hynek/prometheus-async";
55 changelog = "https://github.com/hynek/prometheus-async/blob/${src.rev}/CHANGELOG.md";
56 license = licenses.asl20;
57 maintainers = with maintainers; [ mbalatsko ];
58 };
59}