2022-10-06 18:32:54 +00:00
|
|
|
{ lib
|
2022-11-04 12:27:35 +00:00
|
|
|
, aiohttp
|
2024-04-21 15:54:59 +00:00
|
|
|
, aiooui
|
2022-10-06 18:32:54 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, home-assistant-bluetooth
|
2022-11-04 12:27:35 +00:00
|
|
|
, mac-vendor-lookup
|
2022-10-06 18:32:54 +00:00
|
|
|
, poetry-core
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ibeacon-ble";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.2.0";
|
|
|
|
pyproject = true;
|
2022-10-06 18:32:54 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Bluetooth-Devices";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "ibeacon-ble";
|
2023-02-16 17:41:37 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-1liSWxduYpjIMu7226EH4bsc7gca5g/fyL79W4ZMdU4=";
|
2022-10-06 18:32:54 +00:00
|
|
|
};
|
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-04-21 15:54:59 +00:00
|
|
|
--replace-fail " --cov=ibeacon_ble --cov-report=term-missing:skip-covered" ""
|
2022-11-04 12:27:35 +00:00
|
|
|
'';
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-11-04 12:27:35 +00:00
|
|
|
aiohttp
|
2024-04-21 15:54:59 +00:00
|
|
|
aiooui
|
2022-10-06 18:32:54 +00:00
|
|
|
home-assistant-bluetooth
|
2022-11-04 12:27:35 +00:00
|
|
|
mac-vendor-lookup
|
2022-10-06 18:32:54 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-10-06 18:32:54 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"ibeacon_ble"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library for iBeacon BLE devices";
|
|
|
|
homepage = "https://github.com/Bluetooth-Devices/ibeacon-ble";
|
2023-02-16 17:41:37 +00:00
|
|
|
changelog = "https://github.com/Bluetooth-Devices/ibeacon-ble/blob/v${version}/CHANGELOG.md";
|
2022-10-06 18:32:54 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|