mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 13:43:22 +00:00
36 lines
934 B
Nix
36 lines
934 B
Nix
{ lib, buildPythonPackage, isPy3k, fetchPypi
|
|
, bluez, dbus-next, pytestCheckHook, pytest-cov
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "bleak";
|
|
version = "0.14.0";
|
|
|
|
disabled = !isPy3k;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "b449cc63f769c2d219c67e23ffb9f3a5b5f23eb2d68d05878743dbed83a14360";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|