1{ 2 lib, 3 bleak-retry-connector, 4 bleak, 5 buildPythonPackage, 6 fetchFromGitHub, 7 pycryptodome, 8 pytest-asyncio, 9 pytestCheckHook, 10 pythonOlder, 11 setuptools, 12}: 13 14buildPythonPackage rec { 15 pname = "motionblindsble"; 16 version = "0.1.3"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.9"; 20 21 src = fetchFromGitHub { 22 owner = "LennP"; 23 repo = "motionblindsble"; 24 tag = version; 25 hash = "sha256-1dA3YTjoAhe+p5vk6Xb42a+rE63m2mn5iHhVV/6tlQ0="; 26 }; 27 28 postPatch = '' 29 substituteInPlace setup.py \ 30 --replace-fail "{{VERSION_PLACEHOLDER}}" "${version}" 31 ''; 32 33 build-system = [ setuptools ]; 34 35 dependencies = [ 36 bleak 37 bleak-retry-connector 38 pycryptodome 39 ]; 40 41 nativeCheckInputs = [ 42 pytest-asyncio 43 pytestCheckHook 44 ]; 45 46 pythonImportsCheck = [ "motionblindsble" ]; 47 48 disabledTests = [ 49 # AssertionError 50 "test_establish_connection" 51 ]; 52 53 meta = with lib; { 54 description = "Module to interface with Motionblinds motors using Bluetooth Low Energy (BLE)"; 55 homepage = "https://github.com/LennP/motionblindsble"; 56 changelog = "https://github.com/LennP/motionblindsble/releases/tag/${version}"; 57 license = licenses.mit; 58 maintainers = with maintainers; [ fab ]; 59 }; 60}