summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/prometheus-async/default.nix
blob: 8e75cc25c487c8d9acb8801d36a033cf1804fbd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
  lib,
  aiohttp,
  buildPythonPackage,
  fetchFromGitHub,
  hatch-vcs,
  hatchling,
  prometheus-client,
  pytest-asyncio,
  pytestCheckHook,
  twisted,
  typing-extensions,
  wrapt,
}:

buildPythonPackage rec {
  pname = "prometheus-async";
  version = "25.1.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "hynek";
    repo = "prometheus-async";
    rev = version;
    hash = "sha256-e/BVxATpafxddq26Rt7XTiK4ajY+saUApXbmTG0/I6I=";
  };

  build-system = [
    hatch-vcs
    hatchling
  ];

  dependencies = [
    prometheus-client
    typing-extensions
    wrapt
  ];

  optional-dependencies = {
    aiohttp = [ aiohttp ];
    consul = [ aiohttp ];
    twisted = [ twisted ];
  };

  nativeCheckInputs = [
    pytestCheckHook
    pytest-asyncio
  ];

  pythonImportsCheck = [ "prometheus_async" ];

  meta = {
    description = "Async helpers for prometheus_client";
    homepage = "https://github.com/hynek/prometheus-async";
    changelog = "https://github.com/hynek/prometheus-async/blob/${src.rev}/CHANGELOG.md";
    license = lib.licenses.asl20;
    maintainers = [ ];
  };
}