summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/avion/default.nix
blob: d536982bd31aaa1316cb246f3e72757ec6d74ad7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
  lib,
  bluepy,
  buildPythonPackage,
  csrmesh,
  fetchPypi,
  pycryptodome,
  requests,
}:

buildPythonPackage rec {
  pname = "avion";
  version = "0.10";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-v/0NwFmxDZ9kEOx5qs5L9sKzOg/kto79syctg0Ah+30=";
  };

  postPatch = ''
    # https://github.com/mjg59/python-avion/pull/16
    substituteInPlace setup.py \
      --replace "bluepy>==1.1.4" "bluepy>=1.1.4"
  '';

  propagatedBuildInputs = [
    bluepy
    csrmesh
    pycryptodome
    requests
  ];

  # Module has no test
  doCheck = false;

  # bluepy/uuids.json is not found
  # pythonImportsCheck = [ "avion" ];

  meta = {
    description = "Python API for controlling Avi-on Bluetooth dimmers";
    homepage = "https://github.com/mjg59/python-avion";
    license = with lib.licenses; [ gpl3Plus ];
    maintainers = with lib.maintainers; [ fab ];
  };
}