Martin Weinelt 2023-08-02 20:26:43 +02:00
parent 6c1e7830e2
commit 5eb5aa5ba3
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -1,8 +1,10 @@
{ lib
, bleak
, bleak-retry-connector
, bluetooth-data-tools
, bluetooth-sensor-state-data
, buildPythonPackage
, cryptography
, fetchFromGitHub
, home-assistant-bluetooth
, poetry-core
@ -14,7 +16,7 @@
buildPythonPackage rec {
pname = "xiaomi-ble";
version = "0.18.2";
version = "0.21.1";
format = "pyproject";
disabled = pythonOlder "3.9";
@ -23,17 +25,25 @@ buildPythonPackage rec {
owner = "Bluetooth-Devices";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-cYmy7tUO3UcSNCpod4sa5R+9K6qB+w0Xtp3Fjbp6VTw=";
hash = "sha256-5AzqsCWDgGhJ1EgJrbA8QHjP/Y14cIdSA0GKwZMrxX0=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --cov=xiaomi_ble --cov-report=term-missing:skip-covered" "" \
--replace 'pycryptodomex = ">=3.18.0"' 'pycryptodomex = ">=3.17.0"'
'';
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
bleak
bleak-retry-connector
bluetooth-data-tools
bluetooth-sensor-state-data
cryptography
home-assistant-bluetooth
pycryptodomex
sensor-state-data
@ -43,11 +53,6 @@ buildPythonPackage rec {
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --cov=xiaomi_ble --cov-report=term-missing:skip-covered" ""
'';
pythonImportsCheck = [
"xiaomi_ble"
];