biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / bleak / default.nix
blob9fde15cf9d6a346b8e446e0df6ea17e9bca12c99
2   lib,
3   async-timeout,
4   bluez,
5   buildPythonPackage,
6   dbus-fast,
7   fetchFromGitHub,
8   poetry-core,
9   pytest-asyncio,
10   pytestCheckHook,
11   pythonOlder,
12   typing-extensions,
15 buildPythonPackage rec {
16   pname = "bleak";
17   version = "0.22.3";
18   format = "pyproject";
20   disabled = pythonOlder "3.8";
22   src = fetchFromGitHub {
23     owner = "hbldh";
24     repo = pname;
25     rev = "refs/tags/v${version}";
26     hash = "sha256-kPeKQcJETZE6+btQsmCgb37yRI2Klg0lZ1ZIrm8ODow=";
27   };
29   postPatch = ''
30     # bleak checks BlueZ's version with a call to `bluetoothctl --version`
31     substituteInPlace bleak/backends/bluezdbus/version.py \
32       --replace \"bluetoothctl\" \"${bluez}/bin/bluetoothctl\"
33   '';
35   nativeBuildInputs = [ poetry-core ];
37   propagatedBuildInputs = [
38     async-timeout
39     dbus-fast
40     typing-extensions
41   ];
43   nativeCheckInputs = [
44     pytest-asyncio
45     pytestCheckHook
46   ];
48   pythonImportsCheck = [ "bleak" ];
50   meta = with lib; {
51     description = "Bluetooth Low Energy platform agnostic client";
52     homepage = "https://github.com/hbldh/bleak";
53     changelog = "https://github.com/hbldh/bleak/blob/v${version}/CHANGELOG.rst";
54     license = licenses.mit;
55     platforms = platforms.linux;
56     maintainers = with maintainers; [ oxzi ];
57   };