ch9344: 2.0 -> 0-unstable-2024-11-15 (#354536)
[NixPkgs.git] / pkgs / development / python-modules / oralb-ble / default.nix
blob11eba7e06ab1c151d01cb5e52f93c18b81264d5c
2   lib,
3   bleak,
4   bleak-retry-connector,
5   bluetooth-data-tools,
6   bluetooth-sensor-state-data,
7   buildPythonPackage,
8   fetchFromGitHub,
9   home-assistant-bluetooth,
10   poetry-core,
11   pytest-asyncio,
12   pytestCheckHook,
13   pythonOlder,
16 buildPythonPackage rec {
17   pname = "oralb-ble";
18   version = "0.18.0";
19   pyproject = true;
21   disabled = pythonOlder "3.9";
23   src = fetchFromGitHub {
24     owner = "Bluetooth-Devices";
25     repo = "oralb-ble";
26     rev = "refs/tags/v${version}";
27     hash = "sha256-e6L8HXpqOAHnEktIJ1N1atC5QXno669W3c/S7cISa48=";
28   };
30   postPatch = ''
31     substituteInPlace pyproject.toml \
32       --replace-fail " --cov=oralb_ble --cov-report=term-missing:skip-covered" ""
33   '';
35   nativeBuildInputs = [ poetry-core ];
37   propagatedBuildInputs = [
38     bleak
39     bleak-retry-connector
40     bluetooth-data-tools
41     bluetooth-sensor-state-data
42     home-assistant-bluetooth
43   ];
45   nativeCheckInputs = [
46     pytest-asyncio
47     pytestCheckHook
48   ];
50   pythonImportsCheck = [ "oralb_ble" ];
52   disabledTests = [
53     # Test is outdated, TypeError: BLEDevice.__init__() missing 2 required...
54     "test_async_poll"
55   ];
57   meta = with lib; {
58     description = "Library for Oral B BLE devices";
59     homepage = "https://github.com/Bluetooth-Devices/oralb-ble";
60     changelog = "https://github.com/Bluetooth-Devices/oralb-ble/releases/tag/v${version}";
61     license = with licenses; [ mit ];
62     maintainers = with maintainers; [ fab ];
63   };