2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
2022-06-26 10:26:21 +00:00
|
|
|
, bleak
|
2022-08-12 12:06:08 +00:00
|
|
|
, bleak-retry-connector
|
2021-03-09 03:18:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-03-05 16:20:37 +00:00
|
|
|
, pythonOlder
|
2022-09-11 15:47:08 +00:00
|
|
|
, pytestCheckHook
|
2021-03-09 03:18:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyswitchbot";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "0.30.1";
|
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}";
|
2022-12-28 21:21:41 +00:00
|
|
|
hash = "sha256-5Rn1hQ1TZhRiCJGJCaA1sl+HnerL/oOhRdMiSl1Recg=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-06-26 10:26:21 +00:00
|
|
|
bleak
|
2022-08-12 12:06:08 +00:00
|
|
|
bleak-retry-connector
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2022-09-11 15:47:08 +00:00
|
|
|
checkInputs = [
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|