2022-08-14 09:10:46 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2023-09-02 09:09:47 +00:00
|
|
|
cryptography,
|
2024-03-24 02:25:37 +00:00
|
|
|
cython,
|
2022-08-14 09:10:46 +00:00
|
|
|
poetry-core,
|
2024-08-07 10:30:37 +00:00
|
|
|
pytest-benchmark,
|
|
|
|
pytest-cov-stub,
|
2022-08-14 09:10:46 +00:00
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2023-04-15 11:01:56 +00:00
|
|
|
setuptools,
|
2022-08-14 09:10:46 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bluetooth-data-tools";
|
2024-09-01 19:29:36 +00:00
|
|
|
version = "1.20.0";
|
|
|
|
pyproject = true;
|
2022-08-14 09:10:46 +00:00
|
|
|
|
2024-09-01 19:29:36 +00:00
|
|
|
disabled = pythonOlder "3.10";
|
2022-08-14 09:10:46 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Bluetooth-Devices";
|
2024-09-01 19:29:36 +00:00
|
|
|
repo = "bluetooth-data-tools";
|
2022-11-19 23:50:38 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-01 19:29:36 +00:00
|
|
|
hash = "sha256-qg2QZc95DD2uTO0fTwoNaPfL+QSrcqDwJvx41lIZDRs=";
|
2022-08-14 09:10:46 +00:00
|
|
|
};
|
|
|
|
|
2023-08-11 05:39:09 +00:00
|
|
|
# The project can build both an optimized cython version and an unoptimized
|
|
|
|
# python version. This ensures we fail if we build the wrong one.
|
|
|
|
env.REQUIRE_CYTHON = 1;
|
|
|
|
|
2024-09-01 19:29:36 +00:00
|
|
|
build-system = [
|
2024-03-24 02:25:37 +00:00
|
|
|
cython
|
2022-08-14 09:10:46 +00:00
|
|
|
poetry-core
|
2023-04-15 11:01:56 +00:00
|
|
|
setuptools
|
2022-08-14 09:10:46 +00:00
|
|
|
];
|
|
|
|
|
2024-09-01 19:29:36 +00:00
|
|
|
dependencies = [ cryptography ];
|
2023-09-02 09:09:47 +00:00
|
|
|
|
2024-08-07 10:30:37 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytest-benchmark
|
|
|
|
pytest-cov-stub
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2022-08-14 09:10:46 +00:00
|
|
|
|
2024-08-07 10:30:37 +00:00
|
|
|
pytestFlagsArray = [ "--benchmark-disable" ];
|
2022-08-14 09:10:46 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "bluetooth_data_tools" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library for converting bluetooth data and packets";
|
|
|
|
homepage = "https://github.com/Bluetooth-Devices/bluetooth-data-tools";
|
2022-11-19 23:50:38 +00:00
|
|
|
changelog = "https://github.com/Bluetooth-Devices/bluetooth-data-tools/blob/v${version}/CHANGELOG.md";
|
2023-08-11 05:39:09 +00:00
|
|
|
license = licenses.asl20;
|
2022-08-14 09:10:46 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|