2024-06-24 18:47:55 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
bleak-retry-connector,
|
|
|
|
bleak,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pycryptodome,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "motionblindsble";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.1.1";
|
2024-06-24 18:47:55 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "LennP";
|
|
|
|
repo = "motionblindsble";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-GKCSPiwtE3O1vVFzamFkURc+V0w6u19B0vdvkpLY9ZE=";
|
2024-06-24 18:47:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace-fail "{{VERSION_PLACEHOLDER}}" "${version}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
bleak
|
|
|
|
bleak-retry-connector
|
|
|
|
pycryptodome
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "motionblindsble" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
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 = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|