summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/connect-box3/default.nix
blob: e9fd4a33a4d50fae1a5078b8b70abf7f5fd1ef90 (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
{
  lib,
  buildPythonPackage,
  cyclopts,
  fetchFromGitHub,
  hatchling,
  httpx,
  mashumaro,
  pytest-asyncio,
  pytest-httpx,
  pytestCheckHook,
  rich,
}:

buildPythonPackage (finalAttrs: {
  pname = "connect-box3";
  version = "0.2.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "home-assistant-ecosystem";
    repo = "python-connect-box3";
    tag = finalAttrs.version;
    hash = "sha256-eLrCMziV/+maLIded1n0248Xb14uVBps/gzTUz8NMMc=";
  };

  build-system = [ hatchling ];

  dependencies = [
    cyclopts
    httpx
    mashumaro
    rich
  ];

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

  pythonImportsCheck = [ "connect_box3" ];

  meta = {
    description = "Interact with a Connect Box 3 modem/router";
    homepage = "https://github.com/home-assistant-ecosystem/python-connect-box3";
    changelog = "https://github.com/home-assistant-ecosystem/python-connect-box3/releases/tag/${finalAttrs.src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ fab ];
    mainProgram = "connect-box";
  };
})