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