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