1{ lib
2, aiohttp
3, bitstruct
4, buildPythonPackage
5, cryptography
6, fetchFromGitHub
7, fetchpatch
8, pytest-asyncio
9, pytestCheckHook
10, pythonOlder
11, setuptools
12, voluptuous
13, wheel
14}:
15
16buildPythonPackage rec {
17 pname = "python-otbr-api";
18 version = "2.5.0";
19 format = "pyproject";
20
21 disabled = pythonOlder "3.9";
22
23 src = fetchFromGitHub {
24 owner = "home-assistant-libs";
25 repo = pname;
26 rev = "refs/tags/${version}";
27 hash = "sha256-bPN2h60ypjlKpXs1xDS7bZcGRXvatA3EdlAX/HLxxTM=";
28 };
29
30 patches = [
31 # https://github.com/home-assistant-libs/python-otbr-api/pull/68
32 (fetchpatch {
33 name = "relax-setuptools-dependency.patch";
34 url = "https://github.com/home-assistant-libs/python-otbr-api/commit/37eb19c12d17ac7d040ded035d8401def872fbda.patch";
35 hash = "sha256-JGsaLQNbUfz0uK/MeGnR2XTJDs4RnTOEg7BavfDPArg=";
36 })
37 ];
38
39 nativeBuildInputs = [
40 setuptools
41 wheel
42 ];
43
44 propagatedBuildInputs = [
45 aiohttp
46 bitstruct
47 cryptography
48 voluptuous
49 ];
50
51 nativeCheckInputs = [
52 pytest-asyncio
53 pytestCheckHook
54 ];
55
56 pythonImportsCheck = [
57 "python_otbr_api"
58 ];
59
60 meta = with lib; {
61 description = "Library for the Open Thread Border Router";
62 homepage = "https://github.com/home-assistant-libs/python-otbr-api";
63 changelog = "https://github.com/home-assistant-libs/python-otbr-api/releases/tag/${version}";
64 license = licenses.mit;
65 maintainers = with maintainers; [ fab ];
66 };
67}