diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pyswitchbot')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/pyswitchbot/default.nix | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pyswitchbot/default.nix b/nixpkgs/pkgs/development/python-modules/pyswitchbot/default.nix new file mode 100644 index 000000000000..c3ad116570e4 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/pyswitchbot/default.nix @@ -0,0 +1,60 @@ +{ lib +, async-timeout +, bleak +, bleak-retry-connector +, boto3 +, buildPythonPackage +, cryptography +, fetchFromGitHub +, pyopenssl +, pythonOlder +, pytestCheckHook +, requests +}: + +buildPythonPackage rec { + pname = "pyswitchbot"; + version = "0.37.6"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "Danielhiversen"; + repo = "pySwitchbot"; + rev = "refs/tags/${version}"; + hash = "sha256-LZkAyfcDX48hR7lak2mc27lTQQR3VX1ozpdi2btDzbY="; + }; + + 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; + }; +} |