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