depot/third_party/nixpkgs/pkgs/development/python-modules/motionblindsble/default.nix
Default email 83627f9931 Project import generated by Copybara.
GitOrigin-RevId: 2893f56de08021cffd9b6b6dfc70fd9ccd51eb60
2024-06-24 14:47:55 -04:00

55 lines
1.1 KiB
Nix

{
lib,
bleak-retry-connector,
bleak,
buildPythonPackage,
fetchFromGitHub,
pycryptodome,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "motionblindsble";
version = "0.1.0";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "LennP";
repo = "motionblindsble";
rev = "refs/tags/${version}";
hash = "sha256-jWd+7jRuJ8UIIZjx8+7BNCwIo+o4mxAFB2csytmnuso=";
};
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 ];
};
}