2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pkg-config,
|
|
|
|
glib,
|
2020-05-03 17:38:23 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bluepy";
|
|
|
|
version = "1.3.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-05-03 17:38:23 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "1v0wjy1rz0rbwghr1z3xhdm06lqn9iig6vr5j2wmymh3w6pysw9a";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ glib ];
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
|
|
|
# tests try to access hardware
|
|
|
|
checkPhase = ''
|
|
|
|
$out/bin/blescan --help > /dev/null
|
|
|
|
$out/bin/sensortag --help > /dev/null
|
|
|
|
$out/bin/thingy52 --help > /dev/null
|
|
|
|
'';
|
|
|
|
pythonImportsCheck = [ "bluepy" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-05-03 17:38:23 +00:00
|
|
|
description = "Python interface to Bluetooth LE on Linux";
|
|
|
|
homepage = "https://github.com/IanHarvey/bluepy";
|
|
|
|
maintainers = with maintainers; [ georgewhewell ];
|
2021-01-09 10:05:03 +00:00
|
|
|
platforms = platforms.linux;
|
2020-05-03 17:38:23 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
};
|
|
|
|
}
|