2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
bleak,
|
|
|
|
bleak-retry-connector,
|
|
|
|
boto3,
|
|
|
|
buildPythonPackage,
|
|
|
|
cryptography,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pyopenssl,
|
|
|
|
pythonOlder,
|
|
|
|
pytestCheckHook,
|
|
|
|
requests,
|
|
|
|
setuptools,
|
2021-03-09 03:18:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyswitchbot";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.48.2";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2022-03-05 16:20:37 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Danielhiversen";
|
|
|
|
repo = "pySwitchbot";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-5hoV7tM02dLrGvZ47ReVITayLFf2ceRVXOKbNa2t9iM=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
dependencies = [
|
2022-06-26 10:26:21 +00:00
|
|
|
bleak
|
2022-08-12 12:06:08 +00:00
|
|
|
bleak-retry-connector
|
2023-01-11 07:51:40 +00:00
|
|
|
boto3
|
|
|
|
cryptography
|
2023-03-27 19:17:25 +00:00
|
|
|
pyopenssl
|
2023-01-11 07:51:40 +00:00
|
|
|
requests
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
disabledTests = [
|
|
|
|
# mismatch in expected data structure
|
|
|
|
"test_parse_advertisement_data_curtain"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "switchbot" ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library to control Switchbot IoT devices";
|
|
|
|
homepage = "https://github.com/Danielhiversen/pySwitchbot";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/Danielhiversen/pySwitchbot/releases/tag/${version}";
|
2021-03-09 03:18:52 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|