1{ lib 2, stdenv 3, buildPythonPackage 4, fetchFromGitHub 5, bluez 6, gattlib 7}: 8 9buildPythonPackage rec { 10 pname = "pybluez"; 11 version = "unstable-2022-01-28"; 12 format = "setuptools"; 13 14 src = fetchFromGitHub { 15 owner = pname; 16 repo = pname; 17 rev = "5096047f90a1f6a74ceb250aef6243e144170f92"; 18 hash = "sha256-GA58DfCFaVzZQA1HYpGQ68bznrt4SX1ojyOVn8hyCGo="; 19 }; 20 21 buildInputs = [ 22 bluez 23 ]; 24 25 propagatedBuildInputs = [ 26 gattlib 27 ]; 28 29 # there are no tests 30 doCheck = false; 31 32 pythonImportsCheck = [ 33 "bluetooth" 34 "bluetooth.ble" 35 ]; 36 37 meta = with lib; { 38 description = "Bluetooth Python extension module"; 39 homepage = "https://github.com/pybluez/pybluez"; 40 license = licenses.gpl2; 41 maintainers = with maintainers; [ leenaars ]; 42 broken = stdenv.isDarwin; # requires pyobjc-core, pyobjc-framework-Cocoa 43 }; 44 45}