depot/third_party/nixpkgs/pkgs/development/python-modules/pyswitchbot/default.nix

43 lines
853 B
Nix
Raw Normal View History

{ lib
, bleak
, bleak-retry-connector
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
}:
buildPythonPackage rec {
pname = "pyswitchbot";
version = "0.18.6";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "Danielhiversen";
repo = "pySwitchbot";
rev = "refs/tags/${version}";
hash = "sha256-4mVKs3Lycb9DVdFcG1gzM4FjJiQTcV7aT/OLpBacZjU=";
};
propagatedBuildInputs = [
bleak
bleak-retry-connector
];
# Project has no tests
doCheck = false;
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;
};
}