1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, home-assistant-bluetooth 5, poetry-core 6, pytestCheckHook 7, pythonOlder 8, sensor-state-data 9}: 10 11buildPythonPackage rec { 12 pname = "bluetooth-sensor-state-data"; 13 version = "1.6.0"; 14 format = "pyproject"; 15 16 disabled = pythonOlder "3.9"; 17 18 src = fetchFromGitHub { 19 owner = "Bluetooth-Devices"; 20 repo = pname; 21 rev = "v${version}"; 22 hash = "sha256-Btfya9l1UX7GbiUxuaFHT0l+pG+Dg5X0L2JS+1/VYOo="; 23 }; 24 25 nativeBuildInputs = [ 26 poetry-core 27 ]; 28 29 propagatedBuildInputs = [ 30 home-assistant-bluetooth 31 sensor-state-data 32 ]; 33 34 checkInputs = [ 35 pytestCheckHook 36 ]; 37 38 postPatch = '' 39 substituteInPlace pyproject.toml \ 40 --replace " --cov=bluetooth_sensor_state_data --cov-report=term-missing:skip-covered" "" 41 ''; 42 43 pythonImportsCheck = [ 44 "bluetooth_sensor_state_data" 45 ]; 46 47 meta = with lib; { 48 description = "Models for storing and converting Bluetooth Sensor State Data"; 49 homepage = "https://github.com/bluetooth-devices/bluetooth-sensor-state-data"; 50 license = with licenses; [ asl20 ]; 51 maintainers = with maintainers; [ fab ]; 52 }; 53}