python310Packages.xiaomi-ble: init at 0.8.0

This commit is contained in:
Fabian Affolter 2022-08-10 20:46:51 +02:00
parent 7fd4378140
commit 02992588de
2 changed files with 61 additions and 0 deletions

View file

@ -0,0 +1,59 @@
{ lib
, bleak-retry-connector
, bluetooth-sensor-state-data
, buildPythonPackage
, fetchFromGitHub
, home-assistant-bluetooth
, poetry-core
, pycryptodomex
, pytestCheckHook
, pythonOlder
, sensor-state-data
}:
buildPythonPackage rec {
pname = "xiaomi-ble";
version = "0.8.0";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "Bluetooth-Devices";
repo = pname;
rev = "v${version}";
hash = "sha256-HwA2NKsrqXBsC5/rUZUNfHDk8QA7I+zQmwqt0SVhw38=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
bleak-retry-connector
bluetooth-sensor-state-data
home-assistant-bluetooth
pycryptodomex
sensor-state-data
];
checkInputs = [
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --cov=xiaomi_ble --cov-report=term-missing:skip-covered" ""
'';
pythonImportsCheck = [
"xiaomi_ble"
];
meta = with lib; {
description = "Library for Xiaomi BLE devices";
homepage = "https://github.com/Bluetooth-Devices/xiaomi-ble";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -11555,6 +11555,8 @@ in {
xhtml2pdf = callPackage ../development/python-modules/xhtml2pdf { };
xiaomi-ble = callPackage ../development/python-modules/xiaomi-ble { };
xkbcommon = callPackage ../development/python-modules/xkbcommon { };
xkcdpass = callPackage ../development/python-modules/xkcdpass { };