at 24.05-pre 1.3 kB view raw
1{ lib 2, aiohttp 3, asyncio-throttle 4, awesomeversion 5, buildPythonPackage 6, fetchFromGitHub 7, pytestCheckHook 8, pytest-aiohttp 9, pytest-asyncio 10, pythonOlder 11, setuptools 12}: 13 14buildPythonPackage rec { 15 pname = "aiohue"; 16 version = "4.7.0"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.10"; 20 21 src = fetchFromGitHub { 22 owner = "home-assistant-libs"; 23 repo = pname; 24 rev = "refs/tags/${version}"; 25 hash = "sha256-t48rUPAM0XpbDreCwHU/smoyhPtxhwrpDkb1170GkQM="; 26 }; 27 28 postPatch = '' 29 substituteInPlace pyproject.toml \ 30 --replace 'version = "0.0.0"' 'version = "${version}"' 31 ''; 32 33 nativeBuildInputs = [ 34 setuptools 35 ]; 36 37 propagatedBuildInputs = [ 38 awesomeversion 39 aiohttp 40 asyncio-throttle 41 ]; 42 43 nativeCheckInputs = [ 44 pytestCheckHook 45 pytest-asyncio 46 pytest-aiohttp 47 ]; 48 49 pythonImportsCheck = [ 50 "aiohue" 51 "aiohue.discovery" 52 ]; 53 54 disabledTestPaths = [ 55 # File are prefixed with test_ 56 "examples/" 57 ]; 58 59 meta = with lib; { 60 description = "Python package to talk to Philips Hue"; 61 homepage = "https://github.com/home-assistant-libs/aiohue"; 62 changelog = "https://github.com/home-assistant-libs/aiohue/releases/tag/${version}"; 63 license = with licenses; [ asl20 ]; 64 maintainers = with maintainers; [ fab ]; 65 }; 66}