01ed8ef136
GitOrigin-RevId: 20fc948445a6c22d4e8d5178e9a6bc6e1f5417c8
48 lines
1,014 B
Nix
48 lines
1,014 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, home-assistant-bluetooth
|
|
, poetry-core
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, sensor-state-data
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "sensor-state-data";
|
|
version = "2.12.0";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Bluetooth-Devices";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-u17vtw3yu8ibi/omTriy6s33/243WjxM03Nss3pFAYk=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
];
|
|
|
|
checkInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace " --cov=sensor_state_data --cov-report=term-missing:skip-covered" ""
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"sensor_state_data"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Models for storing and converting Sensor Data state";
|
|
homepage = "https://github.com/bluetooth-devices/sensor-state-data";
|
|
license = with licenses; [ asl20 ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|