eeb71630af
GitOrigin-RevId: 636051e353461f073ac55d5d42c1ed062a345046
57 lines
1.1 KiB
Nix
57 lines
1.1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, click
|
|
, fetchFromGitHub
|
|
, pytest-asyncio
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pywizlight";
|
|
version = "0.5.14";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sbidy";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-IkuAYEg5nuUT6zxmuJe6afp4MVWf0+HAnEoAdOrdTvQ=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
click
|
|
];
|
|
|
|
checkInputs = [
|
|
pytest-asyncio
|
|
pytestCheckHook
|
|
];
|
|
|
|
pytestFlagsArray = [
|
|
"--asyncio-mode=legacy"
|
|
];
|
|
|
|
disabledTests = [
|
|
# Tests requires network features (e. g., discovery testing)
|
|
"test_Bulb_Discovery"
|
|
"test_timeout"
|
|
"test_timeout_PilotBuilder"
|
|
"test_error_PilotBuilder_warm_wite"
|
|
"test_error_PilotBuilder_cold_white_lower"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"pywizlight"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Python connector for WiZ light bulbs";
|
|
homepage = "https://github.com/sbidy/pywizlight";
|
|
changelog = "https://github.com/sbidy/pywizlight/releases/tag/v${version}";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|