nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 async-timeout,
4 buildPythonPackage,
5 fetchFromGitLab,
6 flit-core,
7 ifaddr,
8 pytestCheckHook,
9 pythonOlder,
10}:
11
12buildPythonPackage rec {
13 pname = "yeelight";
14 version = "0.7.16";
15 pyproject = true;
16
17 src = fetchFromGitLab {
18 owner = "stavros";
19 repo = "python-yeelight";
20 tag = "v${version}";
21 hash = "sha256-WLEXTDVcSpGCmfEI31cQXGf9+4EIUCkcaeaj25f4ERU=";
22 };
23
24 build-system = [ flit-core ];
25
26 dependencies = [ ifaddr ] ++ lib.optionals (pythonOlder "3.11") [ async-timeout ];
27
28 nativeCheckInputs = [ pytestCheckHook ];
29
30 enabledTestPaths = [ "yeelight/tests.py" ];
31
32 pythonImportsCheck = [ "yeelight" ];
33
34 meta = {
35 description = "Python library for controlling YeeLight RGB bulbs";
36 homepage = "https://gitlab.com/stavros/python-yeelight/";
37 changelog = "https://gitlab.com/stavros/python-yeelight/-/blob/v${version}/CHANGELOG.md";
38 license = lib.licenses.bsd2;
39 maintainers = with lib.maintainers; [ nyanloutre ];
40 };
41}