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 = "sensor-state-data"; 13 version = "2.12.0"; 14 format = "pyproject"; 15 16 disabled = pythonOlder "3.9"; 17 18 src = fetchFromGitHub { 19 owner = "Bluetooth-Devices"; 20 repo = pname; 21 rev = "refs/tags/v${version}"; 22 hash = "sha256-u17vtw3yu8ibi/omTriy6s33/243WjxM03Nss3pFAYk="; 23 }; 24 25 nativeBuildInputs = [ 26 poetry-core 27 ]; 28 29 checkInputs = [ 30 pytestCheckHook 31 ]; 32 33 postPatch = '' 34 substituteInPlace pyproject.toml \ 35 --replace " --cov=sensor_state_data --cov-report=term-missing:skip-covered" "" 36 ''; 37 38 pythonImportsCheck = [ 39 "sensor_state_data" 40 ]; 41 42 meta = with lib; { 43 description = "Models for storing and converting Sensor Data state"; 44 homepage = "https://github.com/bluetooth-devices/sensor-state-data"; 45 license = with licenses; [ asl20 ]; 46 maintainers = with maintainers; [ fab ]; 47 }; 48}