nixpkgs/pkgs/development/python-modules/pyswitchbot/default.nix

58 lines
1.1 KiB
Nix

{
lib,
bleak,
bleak-retry-connector,
boto3,
buildPythonPackage,
cryptography,
fetchFromGitHub,
pyopenssl,
pythonOlder,
pytest-asyncio,
pytestCheckHook,
requests,
setuptools,
}:
buildPythonPackage rec {
pname = "pyswitchbot";
version = "0.53.2";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "Danielhiversen";
repo = "pySwitchbot";
rev = "refs/tags/${version}";
hash = "sha256-V0oTx2uRz58t5IN2atXVlyLvMg1zavzSbd+2NNEQ6V0=";
};
build-system = [ setuptools ];
dependencies = [
bleak
bleak-retry-connector
boto3
cryptography
pyopenssl
requests
];
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [ "switchbot" ];
meta = with lib; {
description = "Python library to control Switchbot IoT devices";
homepage = "https://github.com/Danielhiversen/pySwitchbot";
changelog = "https://github.com/Danielhiversen/pySwitchbot/releases/tag/${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
platforms = platforms.linux;
};
}