about summary refs log tree commit diff
path: root/pkgs/development/python-modules/govee-led-wez/default.nix
blob: 727be405b2163ca52717b0a43dfce83364187f6f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{ lib
, aiohttp
, bleak
, bleak-retry-connector
, buildPythonPackage
, certifi
, fetchFromGitHub
, hatchling
, pytest-asyncio
, pytestCheckHook
, pythonOlder
}:

buildPythonPackage {
  pname = "govee-led-wez";
  version = "0.0.15";
  format = "pyproject";

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "wez";
    repo = "govee-py";
    # https://github.com/wez/govee-py/issues/2
    rev = "931273e3689838613d63bc1bcc65ee744fa999f4";
    hash = "sha256-VMH7sot9e2SYMyBNutyW6oCCjp2N+EKukxn1Dla3AlY=";
  };

  nativeBuildInputs = [
    hatchling
  ];

  propagatedBuildInputs = [
    aiohttp
    bleak
    bleak-retry-connector
    certifi
  ];

  nativeCheckInputs = [
    pytest-asyncio
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "govee_led_wez"
  ];

  meta = with lib; {
    description = "Control Govee Lights from Python";
    homepage = "https://github.com/wez/govee-py";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ SuperSandro2000 ];
  };
}