Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / flux-led / default.nix
blob252c602f937137916fdcec7d897f0f991687e304
1 { lib
2 , async-timeout
3 , buildPythonPackage
4 , fetchFromGitHub
5 , webcolors
6 , pythonOlder
7 , pytestCheckHook
8 }:
10 buildPythonPackage rec {
11   pname = "flux-led";
12   version = "1.0.4";
13   format = "setuptools";
15   disabled = pythonOlder "3.7";
17   src = fetchFromGitHub {
18     owner = "Danielhiversen";
19     repo = "flux_led";
20     rev = "refs/tags/${version}";
21     hash = "sha256-enYo2hZ1C8jqO+8xZhSmIOJQAyrtVUJ9S/e2Bxzhv0I=";
22   };
24   propagatedBuildInputs = [
25     async-timeout
26     webcolors
27   ];
29   nativeCheckInputs = [
30     pytestCheckHook
31   ];
33   postPatch = ''
34     substituteInPlace setup.py \
35       --replace '"pytest-runner>=5.2",' ""
36   '';
38   pytestFlagsArray = [
39     "tests.py"
40   ];
42   pythonImportsCheck = [
43     "flux_led"
44   ];
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   };