depot/third_party/nixpkgs/pkgs/development/python-modules/yeelight/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

54 lines
1.1 KiB
Nix

{ lib
, async-timeout
, buildPythonPackage
, fetchFromGitLab
, flit-core
, future
, ifaddr
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "yeelight";
version = "0.7.14";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitLab {
owner = "stavros";
repo = "python-yeelight";
rev = "refs/tags/v${version}";
hash = "sha256-BnMvRs95rsmoBa/5bp0zShgU1BBHtZzyADjbH0y1d/o=";
};
nativeBuildInputs = [ flit-core ];
propagatedBuildInputs = [
future
ifaddr
] ++ lib.optionals (pythonOlder "3.11") [
async-timeout
];
nativeCheckInputs = [
pytestCheckHook
];
pytestFlagsArray = [
"yeelight/tests.py"
];
pythonImportsCheck = [
"yeelight"
];
meta = with lib; {
description = "Python library for controlling YeeLight RGB bulbs";
homepage = "https://gitlab.com/stavros/python-yeelight/";
changelog = "https://gitlab.com/stavros/python-yeelight/-/blob/v${version}/CHANGELOG.md";
license = licenses.bsd2;
maintainers = with maintainers; [ nyanloutre ];
};
}