c594a97518
GitOrigin-RevId: 301aada7a64812853f2e2634a530ef5d34505048
48 lines
1,013 B
Nix
48 lines
1,013 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, home-assistant-bluetooth
|
|
, poetry-core
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, sensor-state-data
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "sensor-state-data";
|
|
version = "2.9.1";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Bluetooth-Devices";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-bBLBDdwVUCh8VA/6w/5DmJNvayaWHNIe1kRhnOQ2Llc=";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|