1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, poetry-core
5, pytestCheckHook
6, pythonOlder
7}:
8
9buildPythonPackage rec {
10 pname = "bluetooth-data-tools";
11 version = "0.3.0";
12 format = "pyproject";
13
14 disabled = pythonOlder "3.9";
15
16 src = fetchFromGitHub {
17 owner = "Bluetooth-Devices";
18 repo = pname;
19 rev = "refs/tags/v${version}";
20 hash = "sha256-bZ2kT9yIIHFd3/INIuJh3MdKzF8NCYNeVS/Egg5+S7I=";
21 };
22
23 nativeBuildInputs = [
24 poetry-core
25 ];
26
27 checkInputs = [
28 pytestCheckHook
29 ];
30
31 postPatch = ''
32 substituteInPlace pyproject.toml \
33 --replace " --cov=bluetooth_data_tools --cov-report=term-missing:skip-covered" ""
34 '';
35
36 pythonImportsCheck = [
37 "bluetooth_data_tools"
38 ];
39
40 meta = with lib; {
41 description = "Library for converting bluetooth data and packets";
42 homepage = "https://github.com/Bluetooth-Devices/bluetooth-data-tools";
43 changelog = "https://github.com/Bluetooth-Devices/bluetooth-data-tools/blob/v${version}/CHANGELOG.md";
44 license = with licenses; [ asl20 ];
45 maintainers = with maintainers; [ fab ];
46 };
47}