python310Packages.sensor-state-data: init at 2.0.2

This commit is contained in:
Fabian Affolter 2022-08-10 20:23:12 +02:00
parent ee3be6b246
commit 21b61381da
2 changed files with 50 additions and 0 deletions

View file

@ -0,0 +1,48 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, home-assistant-bluetooth
, poetry-core
, pytestCheckHook
, pythonOlder
, sensor-state-data
}:
buildPythonPackage rec {
pname = "sensor-state-data";
version = "2.0.2";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "Bluetooth-Devices";
repo = pname;
rev = "v${version}";
hash = "sha256-EywNH6REtopJoowsKQNNyJNYYyBR7L2pcrvmZAr5PZg=";
};
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 ];
};
}

View file

@ -9721,6 +9721,8 @@ in {
sense-energy = callPackage ../development/python-modules/sense-energy { };
sensor-state-data = callPackage ../development/python-modules/sensor-state-data { };
sentencepiece = callPackage ../development/python-modules/sentencepiece {
inherit (pkgs) sentencepiece;
};