blob: 4a1336dabe6800b764806aaea12c58ee7645bcaa (
plain)
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
56
57
|
{
lib,
bleak-retry-connector,
bleak,
buildPythonPackage,
fetchFromGitHub,
pycryptodome,
pytest-asyncio,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "motionblindsble";
version = "0.1.3";
pyproject = true;
src = fetchFromGitHub {
owner = "LennP";
repo = "motionblindsble";
tag = version;
hash = "sha256-1dA3YTjoAhe+p5vk6Xb42a+rE63m2mn5iHhVV/6tlQ0=";
};
postPatch = ''
substituteInPlace setup.py \
--replace-fail "{{VERSION_PLACEHOLDER}}" "${version}"
'';
build-system = [ setuptools ];
dependencies = [
bleak
bleak-retry-connector
pycryptodome
];
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [ "motionblindsble" ];
disabledTests = [
# AssertionError
"test_establish_connection"
];
meta = {
description = "Module to interface with Motionblinds motors using Bluetooth Low Energy (BLE)";
homepage = "https://github.com/LennP/motionblindsble";
changelog = "https://github.com/LennP/motionblindsble/releases/tag/${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}
|