summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/egauge-async/default.nix
blob: 21ef85108919a0a842e94d7293828bb8750022b5 (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  hatchling,
  uv-dynamic-versioning,
  httpx,
  pytest-asyncio,
  pytest-mock,
  pytestCheckHook,
}:

buildPythonPackage (finalAttrs: {
  pname = "egauge-async";
  version = "0.5.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "neggert";
    repo = "egauge-async";
    tag = "v${finalAttrs.version}";
    hash = "sha256-MbOjyHxCZpJDZIRyWShk2+X1Di8zX4JjyEpLUnHfdzE=";
  };

  build-system = [
    hatchling
    uv-dynamic-versioning
  ];

  dependencies = [
    httpx
  ];

  nativeCheckInputs = [
    pytest-asyncio
    pytest-mock
    pytestCheckHook
  ];

  disabledTestMarks = [
    "integration"
  ];

  pythonImportsCheck = [
    "egauge_async"
  ];

  meta = {
    description = "Async client for eGauge energy monitor";
    homepage = "https://github.com/neggert/egauge-async";
    changelog = "https://github.com/neggert/egauge-async/releases/tag/v${finalAttrs.version}";
    license = lib.licenses.gpl3Only;
    maintainers = with lib.maintainers; [ jamiemagee ];
  };
})