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