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.18.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-wYYSS4lABCbIhmUU3z3Wh0+4zwpEzXl8Kk9gi6LBrbQ="; 23 }; 24 25 nativeBuildInputs = [ 26 poetry-core 27 ]; 28 29 nativeCheckInputs = [ 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 changelog = "https://github.com/Bluetooth-Devices/sensor-state-data/releases/tag/v${version}"; 46 license = with licenses; [ asl20 ]; 47 maintainers = with maintainers; [ fab ]; 48 }; 49}