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