nixpkgs/pkgs/development/python-modules/switchbot-api/default.nix

40 lines
884 B
Nix

{
lib,
aiohttp,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
pythonOlder,
}:
buildPythonPackage rec {
pname = "switchbot-api";
version = "2.3.1";
pyproject = true;
disabled = pythonOlder "3.10";
src = fetchFromGitHub {
owner = "SeraphicCorp";
repo = "py-switchbot-api";
tag = "v${version}";
hash = "sha256-SVVFz+8LjPOJNjEREkKE4yyrDPE5Gf5qKY3ftsx3SyI=";
};
build-system = [ poetry-core ];
dependencies = [ aiohttp ];
# Module has no tests
doCheck = false;
pythonImportsCheck = [ "switchbot_api" ];
meta = with lib; {
description = "Asynchronous library to use Switchbot API";
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 ];
};
}