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