1{ lib 2, aiohttp 3, buildPythonPackage 4, fetchFromGitHub 5, pytest-asyncio 6, pytestCheckHook 7, pythonOlder 8}: 9 10buildPythonPackage rec { 11 pname = "pysmartthings"; 12 version = "0.7.8"; 13 format = "setuptools"; 14 15 disabled = pythonOlder "3.8"; 16 17 src = fetchFromGitHub { 18 owner = "andrewsayre"; 19 repo = pname; 20 rev = version; 21 hash = "sha256-r+f2+vEXJdQGDlbs/MhraFgEmsAf32PU282blLRLjzc="; 22 }; 23 24 propagatedBuildInputs = [ 25 aiohttp 26 ]; 27 28 nativeCheckInputs = [ 29 pytest-asyncio 30 pytestCheckHook 31 ]; 32 33 postPatch = '' 34 substituteInPlace setup.py \ 35 --replace "aiohttp>=3.8.0,<4.0.0" "aiohttp<=4.0.0" 36 ''; 37 38 pythonImportsCheck = [ 39 "pysmartthings" 40 ]; 41 42 meta = with lib; { 43 description = "Python library for interacting with the SmartThings cloud API"; 44 homepage = "https://github.com/andrewsayre/pysmartthings"; 45 changelog = "https://github.com/andrewsayre/pysmartthings/releases/tag/${version}"; 46 license = with licenses; [ mit ]; 47 maintainers = with maintainers; [ fab ]; 48 }; 49}