2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2022-04-15 01:41:22 +00:00
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-04-15 01:41:22 +00:00
|
|
|
, bluez
|
|
|
|
, gattlib
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pybluez";
|
2022-04-15 01:41:22 +00:00
|
|
|
version = "unstable-2022-01-28";
|
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-04-15 01:41:22 +00:00
|
|
|
owner = pname;
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = pname;
|
2022-04-15 01:41:22 +00:00
|
|
|
rev = "5096047f90a1f6a74ceb250aef6243e144170f92";
|
|
|
|
hash = "sha256-GA58DfCFaVzZQA1HYpGQ68bznrt4SX1ojyOVn8hyCGo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
buildInputs = [
|
|
|
|
bluez
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
gattlib
|
|
|
|
];
|
|
|
|
|
|
|
|
# there are no tests
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"bluetooth"
|
|
|
|
"bluetooth.ble"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Bluetooth Python extension module";
|
2022-04-15 01:41:22 +00:00
|
|
|
homepage = "https://github.com/pybluez/pybluez";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ leenaars ];
|
2022-04-15 01:41:22 +00:00
|
|
|
broken = stdenv.isDarwin; # requires pyobjc-core, pyobjc-framework-Cocoa
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|