1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 cryptography, 6 cython, 7 poetry-core, 8 pytest-benchmark, 9 pytest-codspeed, 10 pytest-cov-stub, 11 pytestCheckHook, 12 pythonOlder, 13 setuptools, 14}: 15 16buildPythonPackage rec { 17 pname = "bluetooth-data-tools"; 18 version = "1.28.2"; 19 pyproject = true; 20 21 disabled = pythonOlder "3.10"; 22 23 src = fetchFromGitHub { 24 owner = "Bluetooth-Devices"; 25 repo = "bluetooth-data-tools"; 26 tag = "v${version}"; 27 hash = "sha256-vXg8qNfA/Q2kCK5bhABNHL26zAtapelSZy3tjrD2JTo="; 28 }; 29 30 # The project can build both an optimized cython version and an unoptimized 31 # python version. This ensures we fail if we build the wrong one. 32 env.REQUIRE_CYTHON = 1; 33 34 build-system = [ 35 cython 36 poetry-core 37 setuptools 38 ]; 39 40 dependencies = [ cryptography ]; 41 42 nativeCheckInputs = [ 43 pytest-benchmark 44 pytest-codspeed 45 pytest-cov-stub 46 pytest-codspeed 47 pytestCheckHook 48 ]; 49 50 pytestFlags = [ "--benchmark-disable" ]; 51 52 pythonImportsCheck = [ "bluetooth_data_tools" ]; 53 54 meta = with lib; { 55 description = "Library for converting bluetooth data and packets"; 56 homepage = "https://github.com/Bluetooth-Devices/bluetooth-data-tools"; 57 changelog = "https://github.com/Bluetooth-Devices/bluetooth-data-tools/blob/${src.tag}/CHANGELOG.md"; 58 license = licenses.asl20; 59 maintainers = with maintainers; [ fab ]; 60 }; 61}