Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, async-timeout 3, bluez 4, buildPythonPackage 5, dbus-fast 6, fetchFromGitHub 7, poetry-core 8, pytest-asyncio 9, pytestCheckHook 10, pythonOlder 11, typing-extensions 12}: 13 14buildPythonPackage rec { 15 pname = "bleak"; 16 version = "0.20.2"; 17 format = "pyproject"; 18 19 disabled = pythonOlder "3.8"; 20 21 src = fetchFromGitHub { 22 owner = "hbldh"; 23 repo = pname; 24 rev = "refs/tags/v${version}"; 25 hash = "sha256-hiQSsQHq1hoCQhoWU50i2NXYR/LaTHAize9cfr1uZsY="; 26 }; 27 28 nativeBuildInputs = [ 29 poetry-core 30 ]; 31 32 propagatedBuildInputs = [ 33 async-timeout 34 dbus-fast 35 typing-extensions 36 ]; 37 38 nativeCheckInputs = [ 39 pytest-asyncio 40 pytestCheckHook 41 ]; 42 43 postPatch = '' 44 # bleak checks BlueZ's version with a call to `bluetoothctl --version` 45 substituteInPlace bleak/backends/bluezdbus/__init__.py \ 46 --replace \"bluetoothctl\" \"${bluez}/bin/bluetoothctl\" 47 ''; 48 49 pythonImportsCheck = [ 50 "bleak" 51 ]; 52 53 meta = with lib; { 54 description = "Bluetooth Low Energy platform agnostic client"; 55 homepage = "https://github.com/hbldh/bleak"; 56 changelog = "https://github.com/hbldh/bleak/blob/v${version}/CHANGELOG.rst"; 57 license = licenses.mit; 58 platforms = platforms.linux; 59 maintainers = with maintainers; [ oxzi ]; 60 }; 61}