Files
nixpkgs/pkgs/development/python-modules/bluepy/default.nix
2026-10-17 01:42:37 +02:00

41 lines
894 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
pkg-config,
glib,
}:
buildPythonPackage (finalAttrs: {
pname = "bluepy";
version = "1.3.0";
pyproject = true;
src = fetchPypi {
inherit (finalAttrs) pname version;
hash = "sha256-KnHtr+EDVl+5kCVv82JMFlMDaoN9/JDh4yuDn4OXHOw=";
};
build-system = [ setuptools ];
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" ];
meta = {
description = "Python interface to Bluetooth LE on Linux";
homepage = "https://github.com/IanHarvey/bluepy";
maintainers = with lib.maintainers; [ georgewhewell ];
platforms = lib.platforms.linux;
license = lib.licenses.gpl2;
};
})