depot/third_party/nixpkgs/pkgs/development/python-modules/pyswitchbot/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

60 lines
1.2 KiB
Nix

{ lib
, async-timeout
, bleak
, bleak-retry-connector
, boto3
, buildPythonPackage
, cryptography
, fetchFromGitHub
, pyopenssl
, pythonOlder
, pytestCheckHook
, requests
}:
buildPythonPackage rec {
pname = "pyswitchbot";
version = "0.38.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "Danielhiversen";
repo = "pySwitchbot";
rev = "refs/tags/${version}";
hash = "sha256-0BlrrrOvMHBH+w7r1lzvXg2Lq84XZFfSRheBaDmCpc4=";
};
propagatedBuildInputs = [
async-timeout
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;
};
}