1{ lib 2, buildPythonPackage 3, aiohttp 4, fetchFromGitHub 5, setuptools 6, pythonOlder 7}: 8 9buildPythonPackage rec { 10 pname = "pyswitchbee"; 11 version = "1.6.2"; 12 format = "pyproject"; 13 14 disabled = pythonOlder "3.9"; 15 16 src = fetchFromGitHub { 17 owner = "jafar-atili"; 18 repo = "pySwitchbee"; 19 rev = "refs/tags/${version}"; 20 hash = "sha256-MDutpeHI6MW1VwCRTPJK/y08ee4eidOHluMf6lPQfEk="; 21 }; 22 23 postPatch = '' 24 # https://github.com/jafar-atili/pySwitchbee/pull/2 25 substituteInPlace pyproject.toml \ 26 --replace '"asyncio",' "" 27 ''; 28 29 nativeBuildInputs = [ 30 setuptools 31 ]; 32 33 propagatedBuildInputs = [ 34 aiohttp 35 ]; 36 37 # Module doesn't have tests 38 doCheck = false; 39 40 pythonImportsCheck = [ 41 "switchbee" 42 ]; 43 44 meta = with lib; { 45 description = "Library to control SwitchBee smart home device"; 46 homepage = "https://github.com/jafar-atili/pySwitchbee/"; 47 license = with licenses; [ asl20 ]; 48 maintainers = with maintainers; [ fab ]; 49 }; 50}