81047829ea
GitOrigin-RevId: 48d63e924a2666baf37f4f14a18f19347fbd54a2
35 lines
934 B
Nix
35 lines
934 B
Nix
{ lib, buildPythonPackage, isPy3k, fetchPypi
|
|
, bluez, dbus-next, pytestCheckHook, pytest-cov
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "bleak";
|
|
version = "0.14.1";
|
|
|
|
disabled = !isPy3k;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "9794685d25f8f71d48fef04e2ca8ce8cc243b070f5b08ed70e70ae98341d24bb";
|
|
};
|
|
|
|
postPatch = ''
|
|
# bleak checks BlueZ's version with a call to `bluetoothctl --version`
|
|
substituteInPlace bleak/backends/bluezdbus/__init__.py \
|
|
--replace \"bluetoothctl\" \"${bluez}/bin/bluetoothctl\"
|
|
'';
|
|
|
|
propagatedBuildInputs = [ dbus-next ];
|
|
|
|
checkInputs = [ pytestCheckHook pytest-cov ];
|
|
|
|
pythonImportsCheck = [ "bleak" ];
|
|
|
|
meta = with lib; {
|
|
description = "Bluetooth Low Energy platform Agnostic Klient for Python";
|
|
homepage = "https://github.com/hbldh/bleak";
|
|
license = licenses.mit;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ oxzi ];
|
|
};
|
|
}
|