2021-10-04 12:37:57 +00:00
|
|
|
{ lib
|
|
|
|
, asyncclick
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, importlib-metadata
|
2022-04-27 09:35:20 +00:00
|
|
|
, pydantic
|
2021-10-04 12:37:57 +00:00
|
|
|
, poetry-core
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, voluptuous
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-kasa";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "0.5.0";
|
2021-10-04 12:37:57 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2022-04-15 01:41:22 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "sha256-9zCUYB+TYgDMoTHpR0u42Usq2EKp8vtzlTgU82eXxl8=";
|
2021-10-04 12:37:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
asyncclick
|
|
|
|
importlib-metadata
|
2022-04-27 09:35:20 +00:00
|
|
|
pydantic
|
2021-10-04 12:37:57 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
voluptuous
|
|
|
|
];
|
|
|
|
|
|
|
|
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";
|
|
|
|
homepage = "https://python-kasa.readthedocs.io/";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|