2021-10-04 12:37:57 +00:00
|
|
|
{ lib
|
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
|
|
|
|
, buildPythonPackage
|
2024-01-25 14:12:00 +00:00
|
|
|
, cryptography
|
2021-10-04 12:37:57 +00:00
|
|
|
, fetchFromGitHub
|
2023-07-15 17:15:38 +00:00
|
|
|
, kasa-crypt
|
|
|
|
, orjson
|
2021-10-04 12:37:57 +00:00
|
|
|
, poetry-core
|
2023-07-15 17:15:38 +00:00
|
|
|
, pydantic
|
2021-10-04 12:37:57 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, voluptuous
|
|
|
|
}:
|
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
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
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
pytestFlagsArray = [
|
2022-11-21 17:40:18 +00:00
|
|
|
"--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"
|
|
|
|
];
|
|
|
|
|
2022-01-19 23:45:15 +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 ];
|
|
|
|
};
|
|
|
|
}
|