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