2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
|
|
|
aiohttp,
|
|
|
|
semver,
|
|
|
|
deepmerge,
|
2024-06-20 14:57:18 +00:00
|
|
|
jmespath,
|
2024-06-05 15:53:02 +00:00
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "blebox-uniapi";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "2.4.2";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "blebox";
|
|
|
|
repo = "blebox_uniapi";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-/NXAyEv4RR12/aoSodKiexKlC83GB1YQVAii8vf6U8c=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2024-02-29 20:09:43 +00:00
|
|
|
--replace-fail "pytest-runner" ""
|
2021-06-28 23:13:55 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2024-06-20 14:57:18 +00:00
|
|
|
jmespath
|
2021-06-28 23:13:55 +00:00
|
|
|
semver
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
deepmerge
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "blebox_uniapi" ];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-10-09 19:29:22 +00:00
|
|
|
changelog = "https://github.com/blebox/blebox_uniapi/blob/v${version}/HISTORY.rst";
|
2021-06-28 23:13:55 +00:00
|
|
|
description = "Python API for accessing BleBox smart home devices";
|
|
|
|
homepage = "https://github.com/blebox/blebox_uniapi";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|