Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / bluetooth-data-tools / default.nix
blobfbaf458be3f319a8bb67cd70edb918c5c2785f6c
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , cryptography
5 , cython
6 , poetry-core
7 , pytestCheckHook
8 , pythonOlder
9 , setuptools
12 buildPythonPackage rec {
13   pname = "bluetooth-data-tools";
14   version = "1.19.0";
15   format = "pyproject";
17   disabled = pythonOlder "3.9";
19   src = fetchFromGitHub {
20     owner = "Bluetooth-Devices";
21     repo = pname;
22     rev = "refs/tags/v${version}";
23     hash = "sha256-G345Nz0iVUQWOCEnf5UqUa49kAXCmNY22y4v+J2/G2Q=";
24   };
26   # The project can build both an optimized cython version and an unoptimized
27   # python version. This ensures we fail if we build the wrong one.
28   env.REQUIRE_CYTHON = 1;
30   nativeBuildInputs = [
31     cython
32     poetry-core
33     setuptools
34   ];
36   propagatedBuildInputs = [
37     cryptography
38   ];
40   nativeCheckInputs = [
41     pytestCheckHook
42   ];
44   postPatch = ''
45     substituteInPlace pyproject.toml \
46       --replace " --cov=bluetooth_data_tools --cov-report=term-missing:skip-covered" ""
47   '';
49   pythonImportsCheck = [
50     "bluetooth_data_tools"
51   ];
53   meta = with lib; {
54     description = "Library for converting bluetooth data and packets";
55     homepage = "https://github.com/Bluetooth-Devices/bluetooth-data-tools";
56     changelog = "https://github.com/Bluetooth-Devices/bluetooth-data-tools/blob/v${version}/CHANGELOG.md";
57     license = licenses.asl20;
58     maintainers = with maintainers; [ fab ];
59   };