2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
|
|
|
, bluetooth-data-tools
|
|
|
|
, bluetooth-sensor-state-data
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, sensor-state-data
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sensorpro-ble";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "0.5.3";
|
2022-09-09 14:08:57 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Bluetooth-Devices";
|
|
|
|
repo = pname;
|
2023-02-16 17:41:37 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-02-09 11:40:11 +00:00
|
|
|
hash = "sha256-Zqa6qa0Jw79Iu4VEw6KN0GsZcC1X7OpiYUiyT4zwKyY=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace " --cov=sensorpro_ble --cov-report=term-missing:skip-covered" ""
|
|
|
|
'';
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
bluetooth-data-tools
|
|
|
|
bluetooth-sensor-state-data
|
|
|
|
sensor-state-data
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-09 14:08:57 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"sensorpro_ble"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library for Sensorpro BLE devices";
|
|
|
|
homepage = "https://github.com/Bluetooth-Devices/sensorpro-ble";
|
2022-12-28 21:21:41 +00:00
|
|
|
changelog = "https://github.com/Bluetooth-Devices/sensorpro-ble/blob/v${version}/CHANGELOG.md";
|
2022-09-09 14:08:57 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|