depot/third_party/nixpkgs/pkgs/development/python-modules/pyswitchbot/default.nix
Default email 5083ee08a2 Project import generated by Copybara.
GitOrigin-RevId: 10ecda252ce1b3b1d6403caeadbcc8f30d5ab796
2022-09-30 06:47:45 -05:00

49 lines
982 B
Nix

{ lib
, bleak
, bleak-retry-connector
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pyswitchbot";
version = "0.19.8";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "Danielhiversen";
repo = "pySwitchbot";
rev = "refs/tags/${version}";
hash = "sha256-1vzHd6ouWZrc951a5s0OsjeMbEluP/kS7LDiZ3YOUqk=";
};
propagatedBuildInputs = [
bleak
bleak-retry-connector
];
checkInputs = [
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";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
platforms = platforms.linux;
};
}