2022-11-04 12:27:35 +00:00
|
|
|
{ lib
|
2024-02-29 20:09:43 +00:00
|
|
|
, bleak
|
2023-01-20 10:41:00 +00:00
|
|
|
, bleak-retry-connector
|
2022-11-04 12:27:35 +00:00
|
|
|
, bluetooth-data-tools
|
|
|
|
, bluetooth-sensor-state-data
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, home-assistant-bluetooth
|
|
|
|
, poetry-core
|
2024-02-29 20:09:43 +00:00
|
|
|
, pytest-asyncio
|
2022-11-04 12:27:35 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "oralb-ble";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.18.0";
|
|
|
|
pyproject = true;
|
2022-11-04 12:27:35 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Bluetooth-Devices";
|
2024-02-29 20:09:43 +00:00
|
|
|
repo = "oralb-ble";
|
2022-11-04 12:27:35 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-e6L8HXpqOAHnEktIJ1N1atC5QXno669W3c/S7cISa48=";
|
2022-11-04 12:27:35 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail " --cov=oralb_ble --cov-report=term-missing:skip-covered" ""
|
|
|
|
'';
|
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2024-02-29 20:09:43 +00:00
|
|
|
bleak
|
2023-01-20 10:41:00 +00:00
|
|
|
bleak-retry-connector
|
2022-11-04 12:27:35 +00:00
|
|
|
bluetooth-data-tools
|
|
|
|
bluetooth-sensor-state-data
|
|
|
|
home-assistant-bluetooth
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2024-02-29 20:09:43 +00:00
|
|
|
pytest-asyncio
|
2022-11-04 12:27:35 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"oralb_ble"
|
|
|
|
];
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Test is outdated, TypeError: BLEDevice.__init__() missing 2 required...
|
|
|
|
"test_async_poll"
|
|
|
|
];
|
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Library for Oral B BLE devices";
|
|
|
|
homepage = "https://github.com/Bluetooth-Devices/oralb-ble";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/Bluetooth-Devices/oralb-ble/releases/tag/v${version}";
|
2022-11-04 12:27:35 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|