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