2022-08-12 12:06:08 +00:00
|
|
|
{ lib
|
2022-09-09 14:08:57 +00:00
|
|
|
, bluetooth-data-tools
|
2022-08-12 12:06:08 +00:00
|
|
|
, bluetooth-sensor-state-data
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, sensor-state-data
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "qingping-ble";
|
2022-10-30 15:09:59 +00:00
|
|
|
version = "0.8.2";
|
2022-08-12 12:06:08 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bluetooth-devices";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-10-30 15:09:59 +00:00
|
|
|
hash = "sha256-vfezalq3x9KAMtwixUkIVQIwBO2zd+BDl+JwdRqBn7w=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-09-09 14:08:57 +00:00
|
|
|
bluetooth-data-tools
|
2022-08-12 12:06:08 +00:00
|
|
|
bluetooth-sensor-state-data
|
|
|
|
sensor-state-data
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace " --cov=qingping_ble --cov-report=term-missing:skip-covered" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"qingping_ble"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library for Qingping BLE devices";
|
|
|
|
homepage = "https://github.com/bluetooth-devices/qingping-ble";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|