2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
2021-12-30 13:39:12 +00:00
|
|
|
, asyncio-throttle
|
2022-03-30 09:31:56 +00:00
|
|
|
, awesomeversion
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
2023-10-09 19:29:22 +00:00
|
|
|
, pytest-aiohttp
|
|
|
|
, pytest-asyncio
|
2022-02-20 05:27:41 +00:00
|
|
|
, pythonOlder
|
2023-10-09 19:29:22 +00:00
|
|
|
, setuptools
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiohue";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "4.7.1";
|
2023-10-09 19:29:22 +00:00
|
|
|
pyproject = true;
|
2022-02-20 05:27:41 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
disabled = pythonOlder "3.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "home-assistant-libs";
|
|
|
|
repo = pname;
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-/9kATmBNhKXt2PWB1pRdMJr+QzP23ajQK+jA8BuJ7J4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'version = "0.0.0"' 'version = "${version}"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-03-30 09:31:56 +00:00
|
|
|
awesomeversion
|
2021-05-20 23:08:51 +00:00
|
|
|
aiohttp
|
2021-12-30 13:39:12 +00:00
|
|
|
asyncio-throttle
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-03-30 09:31:56 +00:00
|
|
|
pytestCheckHook
|
2023-10-09 19:29:22 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-aiohttp
|
2022-03-30 09:31:56 +00:00
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"aiohue"
|
|
|
|
"aiohue.discovery"
|
|
|
|
];
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# File are prefixed with test_
|
|
|
|
"examples/"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-05-20 23:08:51 +00:00
|
|
|
description = "Python package to talk to Philips Hue";
|
|
|
|
homepage = "https://github.com/home-assistant-libs/aiohue";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/home-assistant-libs/aiohue/releases/tag/${version}";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|