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