2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
|
|
|
, bluepy
|
|
|
|
, buildPythonPackage
|
|
|
|
, csrmesh
|
|
|
|
, fetchPypi
|
|
|
|
, pycryptodome
|
2023-05-24 13:37:59 +00:00
|
|
|
, pythonOlder
|
2021-02-05 17:12:51 +00:00
|
|
|
, requests
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "avion";
|
|
|
|
version = "0.10";
|
2023-05-24 13:37:59 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-v/0NwFmxDZ9kEOx5qs5L9sKzOg/kto79syctg0Ah+30=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
# https://github.com/mjg59/python-avion/pull/16
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "bluepy>==1.1.4" "bluepy>=1.1.4"
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
bluepy
|
|
|
|
csrmesh
|
|
|
|
pycryptodome
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
# Module has no test
|
2021-02-05 17:12:51 +00:00
|
|
|
doCheck = false;
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
# bluepy/uuids.json is not found
|
|
|
|
# pythonImportsCheck = [ "avion" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python API for controlling Avi-on Bluetooth dimmers";
|
|
|
|
homepage = "https://github.com/mjg59/python-avion";
|
|
|
|
license = with licenses; [ gpl3Plus ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|