1{
2 lib,
3 async-interrupt,
4 async-timeout,
5 bleak,
6 bleak-retry-connector,
7 buildPythonPackage,
8 cryptography,
9 fetchFromGitHub,
10 lru-dict,
11 poetry-core,
12 pytest-asyncio,
13 pytestCheckHook,
14 pythonOlder,
15}:
16
17buildPythonPackage rec {
18 pname = "yalexs-ble";
19 version = "2.4.2";
20 format = "pyproject";
21
22 disabled = pythonOlder "3.9";
23
24 src = fetchFromGitHub {
25 owner = "bdraco";
26 repo = pname;
27 rev = "refs/tags/v${version}";
28 hash = "sha256-A/4N3vmFuzg9vaPISs0P3KxRQZSquPpR1zYcYEePkTA=";
29 };
30
31 nativeBuildInputs = [ poetry-core ];
32
33 propagatedBuildInputs = [
34 async-interrupt
35 async-timeout
36 bleak
37 bleak-retry-connector
38 cryptography
39 lru-dict
40 ];
41
42 nativeCheckInputs = [
43 pytest-asyncio
44 pytestCheckHook
45 ];
46
47 postPatch = ''
48 substituteInPlace pyproject.toml \
49 --replace " --cov=yalexs_ble --cov-report=term-missing:skip-covered" ""
50 '';
51
52 pythonImportsCheck = [ "yalexs_ble" ];
53
54 meta = with lib; {
55 description = "Library for Yale BLE devices";
56 homepage = "https://github.com/bdraco/yalexs-ble";
57 changelog = "https://github.com/bdraco/yalexs-ble/blob/v${version}/CHANGELOG.md";
58 license = with licenses; [ gpl3Only ];
59 maintainers = with maintainers; [ fab ];
60 };
61}