2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
android-backup,
|
|
|
|
appdirs,
|
|
|
|
attrs,
|
|
|
|
buildPythonPackage,
|
|
|
|
click,
|
|
|
|
construct,
|
|
|
|
croniter,
|
|
|
|
cryptography,
|
|
|
|
defusedxml,
|
|
|
|
fetchPypi,
|
|
|
|
fetchpatch,
|
|
|
|
importlib-metadata,
|
|
|
|
micloud,
|
|
|
|
netifaces,
|
|
|
|
poetry-core,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-mock,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
pytz,
|
|
|
|
pyyaml,
|
|
|
|
tqdm,
|
|
|
|
zeroconf,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-miio";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "0.5.12";
|
2021-03-20 04:20:00 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-21 08:47:16 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-08-12 12:06:08 +00:00
|
|
|
hash = "sha256-BJw1Gg3FO2R6WWKjkrpxDN4fTMTug5AIj0SNq1gEbBY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2021-03-20 04:20:00 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
# Fix pytest 7.2 compat
|
|
|
|
url = "https://github.com/rytilahti/python-miio/commit/67d9d771d04d51f5bd97f361ca1c15ae4a18c274.patch";
|
|
|
|
hash = "sha256-Os9vCSKyieCqHs63oX6gcLrtv1N7hbX5WvEurelEp8w=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
android-backup
|
|
|
|
appdirs
|
|
|
|
attrs
|
2021-03-20 04:20:00 +00:00
|
|
|
click
|
|
|
|
construct
|
|
|
|
croniter
|
2021-06-28 23:13:55 +00:00
|
|
|
cryptography
|
2021-03-20 04:20:00 +00:00
|
|
|
defusedxml
|
2022-08-12 12:06:08 +00:00
|
|
|
micloud
|
2021-06-28 23:13:55 +00:00
|
|
|
netifaces
|
|
|
|
pytz
|
|
|
|
pyyaml
|
|
|
|
tqdm
|
|
|
|
zeroconf
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
|
2021-03-20 04:20:00 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-01-20 10:41:00 +00:00
|
|
|
pytest-asyncio
|
2021-03-20 04:20:00 +00:00
|
|
|
pytest-mock
|
2022-04-27 09:35:20 +00:00
|
|
|
pytestCheckHook
|
2021-03-20 04:20:00 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "miio" ];
|
2022-02-21 08:47:16 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python library for interfacing with Xiaomi smart appliances";
|
|
|
|
homepage = "https://github.com/rytilahti/python-miio";
|
2021-03-20 04:20:00 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ flyfloh ];
|
|
|
|
};
|
|
|
|
}
|