depot/third_party/nixpkgs/pkgs/development/python-modules/sensor-state-data/default.nix

49 lines
1,003 B
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, fetchFromGitHub
, home-assistant-bluetooth
, poetry-core
, pytestCheckHook
, pythonOlder
, sensor-state-data
}:
buildPythonPackage rec {
pname = "sensor-state-data";
version = "2.3.1";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "Bluetooth-Devices";
repo = pname;
rev = "v${version}";
hash = "sha256-jAg/xz7HqXiQuC/fNtUS1gKHdISduHfiWPaWucGAPMY=";
};
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 ];
};
}