2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pythonOlder,
|
2024-01-25 14:12:00 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "switchbot-api";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2.1.0";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.10";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SeraphicCorp";
|
|
|
|
repo = "py-switchbot-api";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-dJLjWwBzrT3GnsRpTIXu3SkVDUlnAbRwBlfSQaHWPzc=";
|
2024-01-25 14:12:00 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ poetry-core ];
|
2024-01-25 14:12:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
dependencies = [ aiohttp ];
|
2024-01-25 14:12:00 +00:00
|
|
|
|
|
|
|
# Module has no tests
|
2024-06-05 15:53:02 +00:00
|
|
|
doCheck = false;
|
2024-01-25 14:12:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "switchbot_api" ];
|
2024-01-25 14:12:00 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Asynchronous library to use Switchbot API";
|
2024-01-25 14:12:00 +00:00
|
|
|
homepage = "https://github.com/SeraphicCorp/py-switchbot-api";
|
|
|
|
changelog = "https://github.com/SeraphicCorp/py-switchbot-api/releases/tag/v${version}";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|