Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 cryptography, 6 cython, 7 poetry-core, 8 pytestCheckHook, 9 pythonOlder, 10 setuptools, 11}: 12 13buildPythonPackage rec { 14 pname = "bluetooth-data-tools"; 15 version = "1.19.3"; 16 format = "pyproject"; 17 18 disabled = pythonOlder "3.9"; 19 20 src = fetchFromGitHub { 21 owner = "Bluetooth-Devices"; 22 repo = pname; 23 rev = "refs/tags/v${version}"; 24 hash = "sha256-ofcGdHHd1P+R9ykJGtwHURTzHCeiJ603EqtgUgLPnmM="; 25 }; 26 27 # The project can build both an optimized cython version and an unoptimized 28 # python version. This ensures we fail if we build the wrong one. 29 env.REQUIRE_CYTHON = 1; 30 31 nativeBuildInputs = [ 32 cython 33 poetry-core 34 setuptools 35 ]; 36 37 propagatedBuildInputs = [ cryptography ]; 38 39 nativeCheckInputs = [ pytestCheckHook ]; 40 41 postPatch = '' 42 substituteInPlace pyproject.toml \ 43 --replace " --cov=bluetooth_data_tools --cov-report=term-missing:skip-covered" "" 44 ''; 45 46 pythonImportsCheck = [ "bluetooth_data_tools" ]; 47 48 meta = with lib; { 49 description = "Library for converting bluetooth data and packets"; 50 homepage = "https://github.com/Bluetooth-Devices/bluetooth-data-tools"; 51 changelog = "https://github.com/Bluetooth-Devices/bluetooth-data-tools/blob/v${version}/CHANGELOG.md"; 52 license = licenses.asl20; 53 maintainers = with maintainers; [ fab ]; 54 }; 55}