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