depot/third_party/nixpkgs/pkgs/development/python-modules/sensor-state-data/default.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

49 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, home-assistant-bluetooth
, poetry-core
, pytestCheckHook
, pythonOlder
, sensor-state-data
}:
buildPythonPackage rec {
pname = "sensor-state-data";
version = "2.18.0";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "Bluetooth-Devices";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-wYYSS4lABCbIhmUU3z3Wh0+4zwpEzXl8Kk9gi6LBrbQ=";
};
nativeBuildInputs = [
poetry-core
];
nativeCheckInputs = [
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";
changelog = "https://github.com/Bluetooth-Devices/sensor-state-data/releases/tag/v${version}";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
};
}