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