about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pybluez/default.nix
blob: ca745113c592522c587698be5dcb5dd069c14d6e (plain) (blame)
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
{
  lib,
  stdenv,
  buildPythonPackage,
  fetchFromGitHub,
  bluez,
  gattlib,
}:

buildPythonPackage rec {
  pname = "pybluez";
  version = "unstable-2022-01-28";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = pname;
    repo = pname;
    rev = "5096047f90a1f6a74ceb250aef6243e144170f92";
    hash = "sha256-GA58DfCFaVzZQA1HYpGQ68bznrt4SX1ojyOVn8hyCGo=";
  };

  buildInputs = [ bluez ];

  propagatedBuildInputs = [ gattlib ];

  # there are no tests
  doCheck = false;

  pythonImportsCheck = [
    "bluetooth"
    "bluetooth.ble"
  ];

  meta = with lib; {
    description = "Bluetooth Python extension module";
    homepage = "https://github.com/pybluez/pybluez";
    license = licenses.gpl2;
    maintainers = with maintainers; [ leenaars ];
    broken = stdenv.hostPlatform.isDarwin; # requires pyobjc-core, pyobjc-framework-Cocoa
  };
}