1{
2 lib,
3 buildPythonPackage,
4 click,
5 fetchFromGitHub,
6 pytest-asyncio,
7 pytestCheckHook,
8 pythonOlder,
9}:
10
11buildPythonPackage rec {
12 pname = "pywizlight";
13 version = "0.6.3";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "sbidy";
20 repo = "pywizlight";
21 tag = "v${version}";
22 hash = "sha256-rCoWdqvFLSLNBAHeFJ6f9kZpIg4WyE8VJLpmsYl+gJM=";
23 };
24
25 propagatedBuildInputs = [ click ];
26
27 nativeCheckInputs = [
28 pytest-asyncio
29 pytestCheckHook
30 ];
31
32 pytestFlags = [ "--asyncio-mode=auto" ];
33
34 disabledTests = [
35 # Tests requires network features (e. g., discovery testing)
36 "test_Bulb_Discovery"
37 "test_timeout"
38 "test_timeout_PilotBuilder"
39 "test_error_PilotBuilder_warm_wite"
40 "test_error_PilotBuilder_cold_white_lower"
41 ];
42
43 pythonImportsCheck = [ "pywizlight" ];
44
45 meta = with lib; {
46 description = "Python connector for WiZ light bulbs";
47 mainProgram = "wizlight";
48 homepage = "https://github.com/sbidy/pywizlight";
49 changelog = "https://github.com/sbidy/pywizlight/releases/tag/${src.tag}";
50 license = with licenses; [ mit ];
51 maintainers = with maintainers; [ fab ];
52 };
53}