1{ 2 lib, 3 bluetooth-data-tools, 4 bluetooth-sensor-state-data, 5 buildPythonPackage, 6 cryptography, 7 fetchFromGitHub, 8 poetry-core, 9 pytestCheckHook, 10 pythonOlder, 11 pytz, 12 sensor-state-data, 13}: 14 15buildPythonPackage rec { 16 pname = "bthome-ble"; 17 version = "3.9.0"; 18 pyproject = true; 19 20 disabled = pythonOlder "3.9"; 21 22 src = fetchFromGitHub { 23 owner = "Bluetooth-Devices"; 24 repo = "bthome-ble"; 25 rev = "refs/tags/v${version}"; 26 hash = "sha256-umRPB0eUdFL4kIvqSfbw/Jzh7NZMY6WR4dK+1cyK3EI="; 27 }; 28 29 postPatch = '' 30 substituteInPlace pyproject.toml \ 31 --replace-fail " --cov=bthome_ble --cov-report=term-missing:skip-covered" "" 32 ''; 33 34 build-system = [ poetry-core ]; 35 36 dependencies = [ 37 bluetooth-data-tools 38 bluetooth-sensor-state-data 39 cryptography 40 sensor-state-data 41 pytz 42 ]; 43 44 nativeCheckInputs = [ pytestCheckHook ]; 45 46 pythonImportsCheck = [ "bthome_ble" ]; 47 48 meta = with lib; { 49 description = "Library for BThome BLE devices"; 50 homepage = "https://github.com/Bluetooth-Devices/bthome-ble"; 51 changelog = "https://github.com/bluetooth-devices/bthome-ble/blob/v${version}/CHANGELOG.md"; 52 license = with licenses; [ mit ]; 53 maintainers = with maintainers; [ fab ]; 54 }; 55}