summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-melcloud/default.nix
blob: 1c90472cedfd6ca6b6a89ad32ca081f9d0ff564d (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
60
61
{
  aiohttp,
  aioresponses,
  buildPythonPackage,
  fetchFromGitHub,
  lib,
  mashumaro,
  orjson,
  poetry-core,
  pytest-asyncio,
  pytest-cov-stub,
  pytestCheckHook,
  yarl,
}:

buildPythonPackage rec {
  pname = "python-melcloud";
  version = "0.1.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "erwindouna";
    repo = "python-melcloud";
    tag = version;
    hash = "sha256-ccc6mIYWZEBENbmkbAZ0cFXJFhFNBjXoU/VDe+ETgoQ=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace-fail "poetry-core>=1.5,<2.0" poetry-core
  '';

  build-system = [ poetry-core ];

  pythonRemoveDeps = [
    "aioresponses"
    "mashumaro"
    "orjson"
    "yarl"
  ];

  dependencies = [
    aiohttp
  ];

  pythonImportsCheck = [ "pymelcloud" ];

  nativeCheckInputs = [
    pytest-asyncio
    pytest-cov-stub
    pytestCheckHook
  ];

  meta = {
    changelog = "https://github.com/erwindouna/python-melcloud/blob/${src.tag}/CHANGELOG.md";
    description = "Asynchronous Python client for controlling Melcloud devices";
    homepage = "https://github.com/erwindouna/python-melcloud";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ dotlambda ];
  };
}