2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
2024-01-25 14:12:00 +00:00
|
|
|
, async-interrupt
|
2022-09-09 14:08:57 +00:00
|
|
|
, bleak
|
|
|
|
, bleak-retry-connector
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
2024-01-25 14:12:00 +00:00
|
|
|
, pytestCheckHook
|
2022-09-09 14:08:57 +00:00
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "airthings-ble";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "0.6.0";
|
|
|
|
pyproject = true;
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vincegio";
|
|
|
|
repo = pname;
|
2022-09-11 15:47:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-T+KtB6kPrLahI73W/Bb3A9ws91v4n1EtURgm3RcLzW8=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2022-09-11 15:47:08 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-01-25 14:12:00 +00:00
|
|
|
--replace "-v -Wdefault --cov=airthings_ble --cov-report=term-missing:skip-covered" ""
|
2022-09-11 15:47:08 +00:00
|
|
|
'';
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2024-01-25 14:12:00 +00:00
|
|
|
async-interrupt
|
2022-09-09 14:08:57 +00:00
|
|
|
bleak
|
|
|
|
bleak-retry-connector
|
|
|
|
];
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"airthings_ble"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library for Airthings BLE devices";
|
|
|
|
homepage = "https://github.com/vincegio/airthings-ble";
|
2023-02-16 17:41:37 +00:00
|
|
|
changelog = "https://github.com/vincegio/airthings-ble/releases/tag/v${version}";
|
2022-09-09 14:08:57 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|