1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch2,
6 poetry-core,
7 pytestCheckHook,
8 pythonOlder,
9}:
10
11buildPythonPackage rec {
12 pname = "govee-local-api";
13 version = "1.4.5";
14 pyproject = true;
15
16 disabled = pythonOlder "3.10";
17
18 src = fetchFromGitHub {
19 owner = "Galorhallen";
20 repo = "govee-local-api";
21 rev = "refs/tags/v${version}";
22 hash = "sha256-kmIuo/e3eLJTgmI+2Oq9Y0jov/133jXwgoBayGv33r4=";
23 };
24
25 patches = [
26 (fetchpatch2 {
27 # configure pep517 build-backend
28 url = "https://github.com/Galorhallen/govee-local-api/commit/897a21ae723ff94343bbf4ba1541e3a1d3e03c94.patch";
29 hash = "sha256-/d5jGKGME768Ar+WWWQUByHJPGB31OHShI4oLjcMUIU=";
30 })
31 ];
32
33 build-system = [ poetry-core ];
34
35 nativeCheckInputs = [ pytestCheckHook ];
36
37 pythonImportsCheck = [ "govee_local_api" ];
38
39 meta = with lib; {
40 description = "Library to communicate with Govee local API";
41 homepage = "https://github.com/Galorhallen/govee-local-api";
42 changelog = "https://github.com/Galorhallen/govee-local-api/releases/tag/v${version}";
43 license = licenses.asl20;
44 maintainers = with maintainers; [ fab ];
45 };
46}