2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
aiooui,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
home-assistant-bluetooth,
|
|
|
|
mac-vendor-lookup,
|
|
|
|
poetry-core,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2022-10-06 18:32:54 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
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
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2022-10-06 18:32:54 +00:00
|
|
|
|
|
|
|
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
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-10-06 18:32:54 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "ibeacon_ble" ];
|
2022-10-06 18:32:54 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|