1{ lib
2, buildPythonPackage
3, fetchPypi
4, pkg-config
5, glib
6}:
7
8buildPythonPackage rec {
9 pname = "bluepy";
10 version = "1.3.0";
11
12 src = fetchPypi {
13 inherit pname version;
14 sha256 = "1v0wjy1rz0rbwghr1z3xhdm06lqn9iig6vr5j2wmymh3w6pysw9a";
15 };
16
17 buildInputs = [ glib ];
18 nativeBuildInputs = [ pkg-config ];
19
20 # tests try to access hardware
21 checkPhase = ''
22 $out/bin/blescan --help > /dev/null
23 $out/bin/sensortag --help > /dev/null
24 $out/bin/thingy52 --help > /dev/null
25 '';
26 pythonImportsCheck = [ "bluepy" ];
27
28 meta = with lib; {
29 description = "Python interface to Bluetooth LE on Linux";
30 homepage = "https://github.com/IanHarvey/bluepy";
31 maintainers = with maintainers; [ georgewhewell ];
32 platforms = platforms.linux;
33 license = licenses.gpl2;
34 };
35}