1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchPypi,
6 pydantic,
7 pytestCheckHook,
8 pythonOlder,
9 websockets,
10}:
11
12buildPythonPackage rec {
13 pname = "aiolivisi";
14 version = "0.0.19";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.8";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-eT/sqLykd4gQVt972646mH+QArf7p/XQH53/UtsuKRs=";
22 };
23
24 postPatch = ''
25 # https://github.com/StefanIacobLivisi/aiolivisi/pull/3
26 substituteInPlace setup.py \
27 --replace 'REQUIREMENTS = list(val.strip() for val in open("requirements.txt"))' "" \
28 --replace "REQUIREMENTS," "[],"
29 '';
30
31 propagatedBuildInputs = [
32 aiohttp
33 pydantic
34 websockets
35 ];
36
37 # Module has no tests
38 doCheck = false;
39
40 pythonImportsCheck = [ "aiolivisi" ];
41
42 meta = with lib; {
43 description = "Module to communicate with LIVISI Smart Home Controller";
44 homepage = "https://github.com/StefanIacobLivisi/aiolivisi";
45 changelog = "https://github.com/StefanIacobLivisi/aiolivisi/releases/tag/${version}";
46 license = with licenses; [ asl20 ];
47 maintainers = with maintainers; [ fab ];
48 };
49}