1{ lib 2, aiohttp 3, aresponses 4, asynctest 5, buildPythonPackage 6, fetchFromGitHub 7, poetry-core 8, pytest-aiohttp 9, pytest-asyncio 10, pytestCheckHook 11, python-engineio 12, python-socketio 13, pythonOlder 14, websockets 15}: 16 17buildPythonPackage rec { 18 pname = "aioambient"; 19 version = "2022.10.0"; 20 format = "pyproject"; 21 22 disabled = pythonOlder "3.7"; 23 24 src = fetchFromGitHub { 25 owner = "bachya"; 26 repo = pname; 27 rev = version; 28 sha256 = "sha256-Oppi4J0TuLbqwVn1Hpa4xcU9c/I+YDP3E0VXwiP8a/w="; 29 }; 30 31 postPatch = '' 32 # https://github.com/bachya/aioambient/pull/97 33 substituteInPlace pyproject.toml \ 34 --replace 'websockets = ">=8.1,<10.0"' 'websockets = ">=8.1,<11.0"' 35 ''; 36 37 nativeBuildInputs = [ 38 poetry-core 39 ]; 40 41 propagatedBuildInputs = [ 42 aiohttp 43 python-engineio 44 python-socketio 45 websockets 46 ]; 47 48 checkInputs = [ 49 aresponses 50 asynctest 51 pytest-aiohttp 52 pytest-asyncio 53 pytestCheckHook 54 ]; 55 56 # Ignore the examples directory as the files are prefixed with test_ 57 disabledTestPaths = [ 58 "examples/" 59 ]; 60 61 pythonImportsCheck = [ 62 "aioambient" 63 ]; 64 65 meta = with lib; { 66 description = "Python library for the Ambient Weather API"; 67 homepage = "https://github.com/bachya/aioambient"; 68 license = with licenses; [ mit ]; 69 maintainers = with maintainers; [ fab ]; 70 }; 71}