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