1{
2 lib,
3 async-timeout,
4 asyncstdlib,
5 attrs,
6 buildPythonPackage,
7 defusedxml,
8 fetchFromGitHub,
9 ftfy,
10 httpx,
11 netifaces,
12 pytest-asyncio,
13 pytest-httpx,
14 pytest-timeout,
15 pytestCheckHook,
16 pythonOlder,
17 setuptools,
18}:
19
20buildPythonPackage rec {
21 pname = "denonavr";
22 version = "1.1.2";
23 pyproject = true;
24
25 src = fetchFromGitHub {
26 owner = "ol-iver";
27 repo = "denonavr";
28 tag = version;
29 hash = "sha256-r8Gg7mZwEiSq1iFQJXLb9xCb/iYxTbaCKGBH2EDZQqs=";
30 };
31
32 pythonRelaxDeps = [ "defusedxml" ];
33
34 build-system = [ setuptools ];
35
36 dependencies = [
37 asyncstdlib
38 attrs
39 defusedxml
40 ftfy
41 httpx
42 netifaces
43 ]
44 ++ lib.optionals (pythonOlder "3.11") [ async-timeout ];
45
46 nativeCheckInputs = [
47 pytest-asyncio
48 pytestCheckHook
49 pytest-httpx
50 pytest-timeout
51 ];
52
53 pythonImportsCheck = [ "denonavr" ];
54
55 meta = with lib; {
56 description = "Automation Library for Denon AVR receivers";
57 homepage = "https://github.com/ol-iver/denonavr";
58 changelog = "https://github.com/ol-iver/denonavr/releases/tag/${src.tag}";
59 license = licenses.mit;
60 maintainers = with maintainers; [ ];
61 };
62}