2022-10-02 16:07:57 +02:00
|
|
|
{ lib
|
2022-11-05 12:30:48 +01:00
|
|
|
, aiohttp
|
2022-10-02 16:07:57 +02:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, home-assistant-bluetooth
|
2022-11-05 12:30:48 +01:00
|
|
|
, mac-vendor-lookup
|
2022-10-02 16:07:57 +02:00
|
|
|
, poetry-core
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ibeacon-ble";
|
2022-11-05 12:30:48 +01:00
|
|
|
version = "1.0.1";
|
2022-10-02 16:07:57 +02:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Bluetooth-Devices";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-11-05 12:30:48 +01:00
|
|
|
hash = "sha256-iYgGflM0IpSIMNgPpJAFAl9FYoMfRinM3sP6VRcBSMc=";
|
2022-10-02 16:07:57 +02:00
|
|
|
};
|
|
|
|
|
2022-11-05 12:30:48 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace " --cov=ibeacon_ble --cov-report=term-missing:skip-covered" ""
|
|
|
|
'';
|
|
|
|
|
2022-10-02 16:07:57 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-11-05 12:30:48 +01:00
|
|
|
aiohttp
|
2022-10-02 16:07:57 +02:00
|
|
|
home-assistant-bluetooth
|
2022-11-05 12:30:48 +01:00
|
|
|
mac-vendor-lookup
|
2022-10-02 16:07:57 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"ibeacon_ble"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library for iBeacon BLE devices";
|
|
|
|
homepage = "https://github.com/Bluetooth-Devices/ibeacon-ble";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|