biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / pygatt / default.nix
blobf5f5f4e0831db2643852aae5820cac5b4f79b0c0
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   mock,
6   pexpect,
7   pyserial,
8   pytestCheckHook,
9   pythonOlder,
10   setuptools,
13 buildPythonPackage rec {
14   pname = "pygatt";
15   version = "5.0.0";
16   pyproject = true;
18   disabled = pythonOlder "3.10";
20   src = fetchFromGitHub {
21     owner = "peplin";
22     repo = "pygatt";
23     rev = "refs/tags/v${version}";
24     hash = "sha256-TMIqC+JvNOLU38a9jkacRAbdmAAd4UekFUDRoAWhHFo=";
25   };
27   postPatch = ''
28     substituteInPlace setup.py \
29       --replace-fail "setup_requires" "test_requires"
30   '';
32   pythonRemoveDeps = [ "enum-compat" ];
34   build-system = [ setuptools ];
36   dependencies = [ pyserial ];
38   optional-dependencies.GATTTOOL = [ pexpect ];
40   nativeCheckInputs = [
41     mock
42     pytestCheckHook
43   ] ++ optional-dependencies.GATTTOOL;
45   pythonImportsCheck = [ "pygatt" ];
47   meta = with lib; {
48     description = "Python wrapper the BGAPI for accessing Bluetooth LE Devices";
49     homepage = "https://github.com/peplin/pygatt";
50     changelog = "https://github.com/peplin/pygatt/blob/v${version}/CHANGELOG.rst";
51     license = with licenses; [
52       asl20
53       mit
54     ];
55     maintainers = with maintainers; [ fab ];
56   };