nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 35 lines 921 B view raw
1{ lib, buildPythonPackage, isPy3k, fetchPypi 2, bluez, dbus-next, pytestCheckHook, pytest-cov 3}: 4 5buildPythonPackage rec { 6 pname = "bleak"; 7 version = "0.14.3"; 8 9 disabled = !isPy3k; 10 11 src = fetchPypi { 12 inherit pname version; 13 sha256 = "sha256-dg5bsegECH92JXa5uVY9Y7R9UhsWUpiOKMPLXmS2GZA="; 14 }; 15 16 postPatch = '' 17 # bleak checks BlueZ's version with a call to `bluetoothctl --version` 18 substituteInPlace bleak/backends/bluezdbus/__init__.py \ 19 --replace \"bluetoothctl\" \"${bluez}/bin/bluetoothctl\" 20 ''; 21 22 propagatedBuildInputs = [ dbus-next ]; 23 24 checkInputs = [ pytestCheckHook pytest-cov ]; 25 26 pythonImportsCheck = [ "bleak" ]; 27 28 meta = with lib; { 29 description = "Bluetooth Low Energy platform Agnostic Klient for Python"; 30 homepage = "https://github.com/hbldh/bleak"; 31 license = licenses.mit; 32 platforms = platforms.linux; 33 maintainers = with maintainers; [ oxzi ]; 34 }; 35}