depot/third_party/nixpkgs/pkgs/development/python-modules/pyswitchbot/default.nix
Default email a3d4720129 Project import generated by Copybara.
GitOrigin-RevId: e182da8622a354d44c39b3d7a542dc12cd7baa5f
2022-12-28 22:21:41 +01:00

50 lines
1 KiB
Nix

{ lib
, bleak
, bleak-retry-connector
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pyswitchbot";
version = "0.30.1";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "Danielhiversen";
repo = "pySwitchbot";
rev = "refs/tags/${version}";
hash = "sha256-5Rn1hQ1TZhRiCJGJCaA1sl+HnerL/oOhRdMiSl1Recg=";
};
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";
changelog = "https://github.com/Danielhiversen/pySwitchbot/releases/tag/${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
platforms = platforms.linux;
};
}