02cf88bb76
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
53 lines
1.1 KiB
Nix
53 lines
1.1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, home-assistant-bluetooth
|
|
, poetry-core
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, sensor-state-data
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "bluetooth-sensor-state-data";
|
|
version = "1.5.0";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Bluetooth-Devices";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-Xr9MCTcEnO5bMk9AdBTwBCXwm33UUTP7FYZyjDYrMNA=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
home-assistant-bluetooth
|
|
sensor-state-data
|
|
];
|
|
|
|
checkInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace " --cov=bluetooth_sensor_state_data --cov-report=term-missing:skip-covered" ""
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"bluetooth_sensor_state_data"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Models for storing and converting Bluetooth Sensor State Data";
|
|
homepage = "https://github.com/bluetooth-devices/bluetooth-sensor-state-data";
|
|
license = with licenses; [ asl20 ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|