2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
2023-03-27 19:17:25 +00:00
|
|
|
, async-timeout
|
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
|
2021-03-09 03:18:52 +00:00
|
|
|
, buildPythonPackage
|
2023-01-11 07:51:40 +00:00
|
|
|
, cryptography
|
2021-03-09 03:18:52 +00:00
|
|
|
, fetchFromGitHub
|
2023-03-27 19:17:25 +00:00
|
|
|
, pyopenssl
|
2022-03-05 16:20:37 +00:00
|
|
|
, pythonOlder
|
2022-09-11 15:47:08 +00:00
|
|
|
, pytestCheckHook
|
2023-01-11 07:51:40 +00:00
|
|
|
, requests
|
2021-03-09 03:18:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyswitchbot";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "0.39.0";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
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}";
|
2023-08-22 20:05:09 +00:00
|
|
|
hash = "sha256-CswgfEmKaQvhDXizpcu6d8JMYtJSgNQ3L4+63ee58eE=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-03-27 19:17:25 +00:00
|
|
|
async-timeout
|
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
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-11 15:47:08 +00:00
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +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;
|
|
|
|
};
|
|
|
|
}
|