depot/third_party/nixpkgs/pkgs/development/python-modules/bleak/default.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

35 lines
922 B
Nix

{ lib, buildPythonPackage, isPy3k, fetchPypi
, bluez, dbus-next, pytestCheckHook, pytest-cov
}:
buildPythonPackage rec {
pname = "bleak";
version = "0.13.0";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "1vnwk36qfws9amqrdaynf63dcj2gzxm0ns1l75hrczmd5j2ic1zb";
};
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 ];
};
}