nixpkgs/pkgs/development/python-modules/yeelight/default.nix

42 lines
934 B
Nix
Raw Normal View History

{ lib
, fetchgit
, buildPythonPackage
, pythonOlder
, enum-compat
, future
, ifaddr
, mock
, pytestCheckHook
}:
2020-08-30 19:55:35 +01:00
buildPythonPackage rec {
pname = "yeelight";
version = "0.5.4";
2020-08-30 19:55:35 +01:00
src = fetchgit {
url = "https://gitlab.com/stavros/python-yeelight.git";
rev = "119faeff0d4f9de8c7f6d0580bdecc1c79bcdaea"; # v0.5.4 wasn't tagged
sha256 = "0j2c5pzd3kny7ghr9q7xn9vs8dffvyzz5igaavvvd04w7aph29sy";
2020-08-30 19:55:35 +01:00
};
propagatedBuildInputs = [
future
ifaddr
] ++ lib.optional (pythonOlder "3.4") enum-compat;
2020-08-30 19:55:35 +01:00
checkInputs = [
pytestCheckHook
] ++ lib.optional (pythonOlder "3.3") mock;
pytestFlagsArray = [ "yeelight/tests.py" ];
pythonImportsCheck = [ "yeelight" ];
meta = with lib; {
2020-08-30 19:55:35 +01:00
description = "A Python library for controlling YeeLight RGB bulbs";
homepage = "https://gitlab.com/stavros/python-yeelight/";
license = licenses.asl20;
maintainers = with maintainers; [ nyanloutre ];
};
}