1{ 2 lib, 3 buildPythonPackage, 4 pythonAtLeast, 5 pythonOlder, 6 fetchFromGitHub, 7 setuptools, 8 aiohttp, 9 attrs, 10 defusedxml, 11 pytest-asyncio_0, 12 pytest-aiohttp, 13 pytest-mock, 14 pytestCheckHook, 15}: 16 17buildPythonPackage rec { 18 pname = "arcam-fmj"; 19 version = "2.0.0"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.11"; 23 24 src = fetchFromGitHub { 25 owner = "elupus"; 26 repo = "arcam_fmj"; 27 tag = version; 28 hash = "sha256-OiBTlAcSLhaMWbp5k+0yU1amSpLKnJA+3Q56lyiSDUA="; 29 }; 30 31 build-system = [ setuptools ]; 32 33 dependencies = [ 34 aiohttp 35 attrs 36 defusedxml 37 ]; 38 39 nativeCheckInputs = [ 40 pytest-asyncio_0 41 pytest-aiohttp 42 pytest-mock 43 pytestCheckHook 44 ]; 45 46 disabledTests = lib.optionals (pythonAtLeast "3.12") [ 47 # stuck on EpollSelector.poll() 48 "test_power" 49 "test_multiple" 50 "test_invalid_command" 51 "test_state" 52 "test_silent_server_request" 53 "test_silent_server_disconnect" 54 "test_heartbeat" 55 "test_cancellation" 56 "test_unsupported_zone" 57 ]; 58 59 pythonImportsCheck = [ 60 "arcam.fmj" 61 "arcam.fmj.client" 62 "arcam.fmj.state" 63 "arcam.fmj.utils" 64 ]; 65 66 meta = with lib; { 67 description = "Python library for speaking to Arcam receivers"; 68 mainProgram = "arcam-fmj"; 69 homepage = "https://github.com/elupus/arcam_fmj"; 70 changelog = "https://github.com/elupus/arcam_fmj/releases/tag/${src.tag}"; 71 license = licenses.mit; 72 maintainers = with maintainers; [ dotlambda ]; 73 }; 74}