1{ lib
2, bluepy
3, buildPythonPackage
4, csrmesh
5, fetchPypi
6, pycryptodome
7, pythonOlder
8, requests
9}:
10
11buildPythonPackage rec {
12 pname = "avion";
13 version = "0.10";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-v/0NwFmxDZ9kEOx5qs5L9sKzOg/kto79syctg0Ah+30=";
21 };
22
23 postPatch = ''
24 # https://github.com/mjg59/python-avion/pull/16
25 substituteInPlace setup.py \
26 --replace "bluepy>==1.1.4" "bluepy>=1.1.4"
27 '';
28
29 propagatedBuildInputs = [
30 bluepy
31 csrmesh
32 pycryptodome
33 requests
34 ];
35
36 # Module has no test
37 doCheck = false;
38
39 # bluepy/uuids.json is not found
40 # pythonImportsCheck = [ "avion" ];
41
42 meta = with lib; {
43 description = "Python API for controlling Avi-on Bluetooth dimmers";
44 homepage = "https://github.com/mjg59/python-avion";
45 license = with licenses; [ gpl3Plus ];
46 maintainers = with maintainers; [ fab ];
47 };
48}