2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
anyio,
|
|
|
|
async-timeout,
|
|
|
|
asyncclick,
|
|
|
|
buildPythonPackage,
|
|
|
|
cryptography,
|
|
|
|
fetchFromGitHub,
|
|
|
|
kasa-crypt,
|
|
|
|
orjson,
|
|
|
|
poetry-core,
|
|
|
|
pydantic,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-mock,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
voluptuous,
|
2021-10-04 12:37:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-kasa";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "0.6.2.1";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2021-10-04 12:37:57 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-10-04 12:37:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2024-01-25 14:12:00 +00:00
|
|
|
owner = "python-kasa";
|
|
|
|
repo = "python-kasa";
|
2022-04-15 01:41:22 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-iCqJY3qkA3ZVXTCfxvQoaZsaqGui8PwKGAmLXKZgLJs=";
|
2021-10-04 12:37:57 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2021-10-04 12:37:57 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2024-01-25 14:12:00 +00:00
|
|
|
aiohttp
|
2023-07-15 17:15:38 +00:00
|
|
|
anyio
|
2023-08-04 22:07:22 +00:00
|
|
|
async-timeout
|
2021-10-04 12:37:57 +00:00
|
|
|
asyncclick
|
2024-01-25 14:12:00 +00:00
|
|
|
cryptography
|
2022-04-27 09:35:20 +00:00
|
|
|
pydantic
|
2021-10-04 12:37:57 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-10-04 12:37:57 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
voluptuous
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
passthru.optional-dependencies = {
|
2024-02-07 01:22:34 +00:00
|
|
|
speedups = [
|
2023-07-15 17:15:38 +00:00
|
|
|
kasa-crypt
|
|
|
|
orjson
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "--asyncio-mode=auto" ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2021-10-04 12:37:57 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Skip the examples tests
|
|
|
|
"kasa/tests/test_readme_examples.py"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "kasa" ];
|
2021-10-04 12:37:57 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python API for TP-Link Kasa Smarthome products";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "kasa";
|
2021-10-04 12:37:57 +00:00
|
|
|
homepage = "https://python-kasa.readthedocs.io/";
|
2023-02-22 10:55:15 +00:00
|
|
|
changelog = "https://github.com/python-kasa/python-kasa/blob/${version}/CHANGELOG.md";
|
2021-10-04 12:37:57 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|