1{ lib
2, async-timeout
3, buildPythonPackage
4, fetchFromGitHub
5, webcolors
6, pythonOlder
7, pytestCheckHook
8}:
9
10buildPythonPackage rec {
11 pname = "flux-led";
12 version = "1.0.4";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchFromGitHub {
18 owner = "Danielhiversen";
19 repo = "flux_led";
20 rev = "refs/tags/${version}";
21 hash = "sha256-enYo2hZ1C8jqO+8xZhSmIOJQAyrtVUJ9S/e2Bxzhv0I=";
22 };
23
24 propagatedBuildInputs = [
25 async-timeout
26 webcolors
27 ];
28
29 nativeCheckInputs = [
30 pytestCheckHook
31 ];
32
33 postPatch = ''
34 substituteInPlace setup.py \
35 --replace '"pytest-runner>=5.2",' ""
36 '';
37
38 pytestFlagsArray = [
39 "tests.py"
40 ];
41
42 pythonImportsCheck = [
43 "flux_led"
44 ];
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; [ colemickens ];
52 platforms = platforms.linux;
53 };
54}