1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 setuptools,
7 aiohttp,
8}:
9
10buildPythonPackage rec {
11 pname = "aiowebostv";
12 version = "0.7.5";
13 pyproject = true;
14
15 disabled = pythonOlder "3.11";
16
17 src = fetchFromGitHub {
18 owner = "home-assistant-libs";
19 repo = "aiowebostv";
20 tag = "v${version}";
21 hash = "sha256-3O1NiFNzlWIR/9JR2Y7t9tL4t7tJ6haNwsS5r4m7lMM=";
22 };
23
24 postPatch = ''
25 substituteInPlace pyproject.toml \
26 --replace-fail 'version = "0.0.0"' 'version = "${version}"'
27 '';
28
29 build-system = [ setuptools ];
30
31 dependencies = [ aiohttp ];
32
33 # Module doesn't have tests
34 doCheck = false;
35
36 pythonImportsCheck = [ "aiowebostv" ];
37
38 meta = with lib; {
39 description = "Module to interact with LG webOS based TV devices";
40 homepage = "https://github.com/home-assistant-libs/aiowebostv";
41 changelog = "https://github.com/home-assistant-libs/aiowebostv/releases/tag/${src.tag}";
42 license = licenses.asl20;
43 maintainers = with maintainers; [ fab ];
44 };
45}