83627f9931
GitOrigin-RevId: 2893f56de08021cffd9b6b6dfc70fd9ccd51eb60
58 lines
1.2 KiB
Nix
58 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
bleak,
|
|
bleak-retry-connector,
|
|
boto3,
|
|
buildPythonPackage,
|
|
cryptography,
|
|
fetchFromGitHub,
|
|
pyopenssl,
|
|
pythonOlder,
|
|
pytestCheckHook,
|
|
requests,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyswitchbot";
|
|
version = "0.48.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Danielhiversen";
|
|
repo = "pySwitchbot";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-UVLB1SdtYiMsXR3od2gIxNxiQ6wyW2ItAJQrxv0w1tk=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
bleak
|
|
bleak-retry-connector
|
|
boto3
|
|
cryptography
|
|
pyopenssl
|
|
requests
|
|
];
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
disabledTests = [
|
|
# mismatch in expected data structure
|
|
"test_parse_advertisement_data_curtain"
|
|
];
|
|
|
|
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;
|
|
};
|
|
}
|