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
|
2021-03-09 03:18:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyswitchbot";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "0.18.6";
|
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}";
|
|
|
|
hash = "sha256-4mVKs3Lycb9DVdFcG1gzM4FjJiQTcV7aT/OLpBacZjU=";
|
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
|
|
|
|
|
|
|
# Project has no tests
|
|
|
|
doCheck = false;
|
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";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|