1{ 2 lib, 3 aiohttp, 4 async-timeout, 5 buildPythonPackage, 6 fetchFromGitHub, 7 pytest-asyncio, 8 pytestCheckHook, 9 pythonAtLeast, 10 pythonOlder, 11 setuptools, 12}: 13 14buildPythonPackage rec { 15 pname = "pysqueezebox"; 16 version = "0.12.1"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.10"; 20 21 src = fetchFromGitHub { 22 owner = "rajlaud"; 23 repo = "pysqueezebox"; 24 tag = "v${version}"; 25 hash = "sha256-Bi809OzIoQ2TJH77kZlsSSPEmDNgz6hAybmOXbFn3LM="; 26 }; 27 28 build-system = [ setuptools ]; 29 30 dependencies = [ 31 async-timeout 32 aiohttp 33 ]; 34 35 nativeCheckInputs = [ 36 pytest-asyncio 37 pytestCheckHook 38 ]; 39 40 pythonImportsCheck = [ "pysqueezebox" ]; 41 42 disabledTests = lib.optionals (pythonAtLeast "3.12") [ 43 # AttributeError: 'has_calls' is not a valid assertion. Use a spec for the mock if 'has_calls' is meant to be an attribute. 44 "test_verified_pause" 45 ]; 46 47 disabledTestPaths = [ 48 # Tests require network access 49 "tests/test_integration.py" 50 ]; 51 52 meta = with lib; { 53 description = "Asynchronous library to control Logitech Media Server"; 54 homepage = "https://github.com/rajlaud/pysqueezebox"; 55 changelog = "https://github.com/rajlaud/pysqueezebox/releases/tag/${src.tag}"; 56 license = licenses.asl20; 57 maintainers = with maintainers; [ nyanloutre ]; 58 }; 59}