1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, aiohttp
5, semver
6, asynctest
7, deepmerge
8, pytest-asyncio
9, pytestCheckHook
10, pythonOlder
11}:
12
13buildPythonPackage rec {
14 pname = "blebox-uniapi";
15 version = "2.1.3";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.9";
19
20 src = fetchFromGitHub {
21 owner = "blebox";
22 repo = "blebox_uniapi";
23 rev = "refs/tags/v${version}";
24 hash = "sha256-rgZ/nHihhPZnc8LLtsrAXDCQT1XaXOnI7xBid+6khfs=";
25 };
26
27 postPatch = ''
28 substituteInPlace setup.py \
29 --replace "pytest-runner" ""
30 '';
31
32 propagatedBuildInputs = [
33 aiohttp
34 semver
35 ];
36
37 checkInputs = [
38 asynctest
39 deepmerge
40 pytest-asyncio
41 pytestCheckHook
42 ];
43
44 pythonImportsCheck = [
45 "blebox_uniapi"
46 ];
47
48 meta = with lib; {
49 description = "Python API for accessing BleBox smart home devices";
50 homepage = "https://github.com/blebox/blebox_uniapi";
51 license = licenses.asl20;
52 maintainers = with maintainers; [ dotlambda ];
53 };
54}