1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hidapi,
6 loguru,
7 pyserial,
8 pytest-asyncio,
9 pytestCheckHook,
10 uv-build,
11}:
12
13buildPythonPackage rec {
14 pname = "busylight-core";
15 version = "0.15.2";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "JnyJny";
20 repo = "busylight-core";
21 tag = "v${version}";
22 hash = "sha256-r7mAKD/uodY5RRklYL6u2HTdcU+rt6taTpBkTB/Sv9Y=";
23 };
24
25 postPatch = ''
26 substituteInPlace pyproject.toml \
27 --replace-fail "uv_build>=0.7.19,<0.8" "uv_build"
28 '';
29
30 build-system = [ uv-build ];
31
32 dependencies = [
33 hidapi
34 loguru
35 pyserial
36 ];
37
38 nativeCheckInputs = [
39 pytest-asyncio
40 pytestCheckHook
41 ];
42
43 pythonImportsCheck = [ "busylight_core" ];
44
45 meta = {
46 description = "Library for interacting programmatically with USB-connected LED lights";
47 homepage = "https://github.com/JnyJny/busylight-core";
48 changelog = "https://github.com/JnyJny/busylight-core/blob/${src.tag}/CHANGELOG.md";
49 license = lib.licenses.asl20;
50 maintainers = with lib.maintainers; [ fab ];
51 };
52}