nixpkgs/pkgs/development/python-modules/bluetooth-data-tools/default.nix
Martin Weinelt 528354e66c
python312Packages.cython: 0.29.36 -> 3.0.9
Folds the cython_3 attribute into the primary cython attribute and
migrates all packages from the versioned attribute.

The old version will be provided through the cython_0 attribute in an
effort to phase it out.
2024-03-27 18:35:05 +01:00

61 lines
1.3 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, cryptography
, cython
, poetry-core
, pytestCheckHook
, pythonOlder
, setuptools
}:
buildPythonPackage rec {
pname = "bluetooth-data-tools";
version = "1.19.0";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "Bluetooth-Devices";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-G345Nz0iVUQWOCEnf5UqUa49kAXCmNY22y4v+J2/G2Q=";
};
# 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;
nativeBuildInputs = [
cython
poetry-core
setuptools
];
propagatedBuildInputs = [
cryptography
];
nativeCheckInputs = [
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --cov=bluetooth_data_tools --cov-report=term-missing:skip-covered" ""
'';
pythonImportsCheck = [
"bluetooth_data_tools"
];
meta = with lib; {
description = "Library for converting bluetooth data and packets";
homepage = "https://github.com/Bluetooth-Devices/bluetooth-data-tools";
changelog = "https://github.com/Bluetooth-Devices/bluetooth-data-tools/blob/v${version}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}