2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
|
|
|
, bleak
|
|
|
|
, bleak-retry-connector
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "airthings-ble";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "0.5.5";
|
2022-09-09 14:08:57 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vincegio";
|
|
|
|
repo = pname;
|
2022-09-11 15:47:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-02-02 18:25:31 +00:00
|
|
|
hash = "sha256-A1YsYOquDUDGeEI4xzQSjEk1H92Jjlhsb5IPRt0lM2c=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2022-09-11 15:47:08 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2022-10-06 18:32:54 +00:00
|
|
|
--replace 'bleak-retry-connector = "^0.15.1"' 'bleak = "*"'
|
2022-09-11 15:47:08 +00:00
|
|
|
'';
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
bleak
|
|
|
|
bleak-retry-connector
|
|
|
|
];
|
|
|
|
|
|
|
|
# Module has no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|