1{
2 lib,
3 async-timeout,
4 buildPythonPackage,
5 fetchFromGitHub,
6 webcolors,
7 pythonOlder,
8 pytest-asyncio,
9 pytestCheckHook,
10 setuptools,
11}:
12
13buildPythonPackage rec {
14 pname = "flux-led";
15 version = "1.2.0";
16 pyproject = true;
17
18 disabled = pythonOlder "3.10";
19
20 src = fetchFromGitHub {
21 owner = "Danielhiversen";
22 repo = "flux_led";
23 tag = version;
24 hash = "sha256-+i+/WMHdz4HPKDlRPV1Aq9QqrTo5gZiulSc7Hinn+kI=";
25 };
26
27 postPatch = ''
28 substituteInPlace setup.py \
29 --replace-fail '"pytest-runner>=5.2",' ""
30 '';
31
32 build-system = [ setuptools ];
33
34 dependencies = [
35 async-timeout
36 webcolors
37 ];
38
39 nativeCheckInputs = [
40 pytest-asyncio
41 pytestCheckHook
42 ];
43
44 pythonImportsCheck = [ "flux_led" ];
45
46 meta = with lib; {
47 description = "Python library to communicate with the flux_led smart bulbs";
48 homepage = "https://github.com/Danielhiversen/flux_led";
49 changelog = "https://github.com/Danielhiversen/flux_led/releases/tag/${version}";
50 license = licenses.lgpl3Plus;
51 maintainers = with maintainers; [ ];
52 platforms = platforms.linux;
53 mainProgram = "flux_led";
54 };
55}