12 buildPythonPackage rec {
17 disabled = pythonOlder "3.8";
19 src = fetchFromGitHub {
20 owner = "Danielhiversen";
22 rev = "refs/tags/${version}";
23 hash = "sha256-enYo2hZ1C8jqO+8xZhSmIOJQAyrtVUJ9S/e2Bxzhv0I=";
27 substituteInPlace setup.py \
28 --replace-fail '"pytest-runner>=5.2",' ""
29 # webcolors API change, https://github.com/Danielhiversen/flux_led/issues/401
30 substituteInPlace flux_led/utils.py \
31 --replace-fail "CSS2_HEX_TO_NAMES.values()" 'names("css2")' \
32 --replace-fail "CSS21_HEX_TO_NAMES.values()" 'names("css21")' \
33 --replace-fail "CSS3_HEX_TO_NAMES.values()" 'names("css3")' \
34 --replace-fail "HTML4_HEX_TO_NAMES.values()" 'names("html4")'
37 build-system = [ setuptools ];
44 nativeCheckInputs = [ pytestCheckHook ];
46 pytestFlagsArray = [ "tests.py" ];
48 pythonImportsCheck = [ "flux_led" ];
51 # # AttributeError: module 'webcolors' has no attribute 'CSS2_HEX_TO_NAMES'
52 # "test_get_color_names_list"
56 description = "Python library to communicate with the flux_led smart bulbs";
57 homepage = "https://github.com/Danielhiversen/flux_led";
58 changelog = "https://github.com/Danielhiversen/flux_led/releases/tag/${version}";
59 license = licenses.lgpl3Plus;
60 maintainers = with maintainers; [ colemickens ];
61 platforms = platforms.linux;
62 mainProgram = "flux_led";