about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pytradfri/default.nix
blob: b4de887f54559a3a68eda3149b6ef65076310124 (plain) (blame)
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
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, aiocoap
, dtlssocket
, pydantic
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "pytradfri";
  version = "13.0.0";
  format = "setuptools";

  disabled = pythonOlder "3.9";

  src = fetchFromGitHub {
    owner = "home-assistant-libs";
    repo = "pytradfri";
    rev = "refs/tags/${version}";
    hash = "sha256-CWv3ebDulZuiFP+nJ2Xr7U/HTDFTqA9VYC0USLkpWR0=";
  };

  propagatedBuildInputs = [
    pydantic
  ];

  passthru.optional-dependencies = {
    async = [
      aiocoap
      dtlssocket
    ];
  };

  nativeCheckInputs = [
    pytestCheckHook
  ]
  ++ passthru.optional-dependencies.async;

  pythonImportsCheck = [
    "pytradfri"
  ];

  meta = with lib; {
    description = "Python package to communicate with the IKEA Trådfri ZigBee Gateway";
    homepage = "https://github.com/home-assistant-libs/pytradfri";
    changelog = "https://github.com/home-assistant-libs/pytradfri/releases/tag/${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ dotlambda ];
    # https://github.com/home-assistant-libs/pytradfri/issues/720
    broken = versionAtLeast pydantic.version "2";
  };
}