nautilus: fix cross compilation (#373662)
[NixPkgs.git] / pkgs / development / python-modules / yeelight / default.nix
blobba9faf0217b2ad29cde2b280824dd2dcb7c478c9
2   lib,
3   async-timeout,
4   buildPythonPackage,
5   fetchFromGitLab,
6   fetchpatch2,
7   flit-core,
8   ifaddr,
9   pytestCheckHook,
10   pythonOlder,
13 buildPythonPackage rec {
14   pname = "yeelight";
15   version = "0.7.14";
16   pyproject = true;
18   disabled = pythonOlder "3.7";
20   src = fetchFromGitLab {
21     owner = "stavros";
22     repo = "python-yeelight";
23     rev = "refs/tags/v${version}";
24     hash = "sha256-BnMvRs95rsmoBa/5bp0zShgU1BBHtZzyADjbH0y1d/o=";
25   };
27   patches = [
28     (fetchpatch2 {
29       name = "remove-future-dependency.patch";
30       url = "https://gitlab.com/stavros/python-yeelight/-/commit/654f4f34e0246e65d8db02a107e2ab706de4806d.patch";
31       hash = "sha256-olKpYCzIq/E7zup40Kwzwgk5iOtCubLHo9uQDOhaByQ=";
32     })
33   ];
35   build-system = [ flit-core ];
37   dependencies = [ ifaddr ] ++ lib.optionals (pythonOlder "3.11") [ async-timeout ];
39   nativeCheckInputs = [ pytestCheckHook ];
41   pytestFlagsArray = [ "yeelight/tests.py" ];
43   pythonImportsCheck = [ "yeelight" ];
45   meta = with lib; {
46     description = "Python library for controlling YeeLight RGB bulbs";
47     homepage = "https://gitlab.com/stavros/python-yeelight/";
48     changelog = "https://gitlab.com/stavros/python-yeelight/-/blob/v${version}/CHANGELOG.md";
49     license = licenses.bsd2;
50     maintainers = with maintainers; [ nyanloutre ];
51   };