at master 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 hatchling, 6 bleak, 7 coloredlogs, 8 pyserial, 9 bless, 10}: 11 12buildPythonPackage rec { 13 pname = "ble-serial"; 14 version = "3.0.0"; 15 pyproject = true; 16 17 src = fetchFromGitHub { 18 owner = "Jakeler"; 19 repo = "ble-serial"; 20 tag = "v${version}"; 21 hash = "sha256-lbqu6VeE8XEIUvUILqKsTA+0/lxTr8GTbUBkSae/ruE="; 22 fetchSubmodules = true; 23 }; 24 25 build-system = [ 26 hatchling 27 ]; 28 29 dependencies = [ 30 bleak 31 coloredlogs 32 pyserial 33 ]; 34 35 optional-dependencies = { 36 server = [ 37 bless 38 ]; 39 }; 40 41 # Requires real hardware to test 42 # https://github.com/Jakeler/ble-serial/blob/3f1a619208a0eb372a0993aadc086c4842946f21/tests/test.py 43 doCheck = false; 44 45 pythonImportsCheck = [ 46 "ble_serial.bluetooth.ble_client" 47 "ble_serial.scan" 48 ]; 49 50 meta = { 51 description = "\"RFCOMM for BLE\" a Serial UART over Bluetooth low energy (4+) bridge"; 52 homepage = "https://github.com/Jakeler/ble-serial"; 53 license = lib.licenses.mit; 54 maintainers = with lib.maintainers; [ eljamm ]; 55 platforms = lib.platforms.unix; 56 }; 57}