summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/btlewrap/default.nix
blob: b0d91e996dfeac4aea2c1dd87f6625c1433b8d33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  bluepy,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "btlewrap";
  version = "0.1.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "ChristianKuehnel";
    repo = "btlewrap";
    tag = "v${version}";
    hash = "sha256-cjPj+Uw/L9kq/BbxlnOCJtaBcnf9VOJKN2NJ3cmKe6U=";
  };

  build-system = [ setuptools ];

  optional-dependencies = {
    bluepy = [ bluepy ];
  };

  nativeCheckInputs = [ pytestCheckHook ];

  disabledTestPaths = [
    # Require optional dependencies or hardware
    "test/unit_tests/test_bluepy.py"
    "test/unit_tests/test_pygatt.py"
    "test/integration_tests/"
    "test/unit_tests/test_available_backends.py"
  ];

  pythonImportsCheck = [ "btlewrap" ];

  meta = {
    description = "Wrapper around different bluetooth low energy backends";
    homepage = "https://github.com/ChristianKuehnel/btlewrap";
    changelog = "https://github.com/ChristianKuehnel/btlewrap/releases/tag/v${version}";
    license = lib.licenses.mit;
    maintainers = [ lib.maintainers.jamiemagee ];
  };
}