Files
nixpkgs/pkgs/development/python-modules/motionblindsble/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

61 lines
1.2 KiB
Nix

{
lib,
bleak-retry-connector,
bleak,
buildPythonPackage,
fetchFromGitHub,
pycryptodome,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "motionblindsble";
version = "0.1.3";
pyproject = true;
disabled = pythonOlder "3.9";
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 ];
};
}