From 9c716aa71a694675686e560f047b35f3a51b8841 Mon Sep 17 00:00:00 2001 From: georgewhewell Date: Sun, 26 Apr 2020 16:52:21 +0100 Subject: [PATCH] pythonPackages.bluepy: init at 1.3.0 --- .../python-modules/bluepy/default.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/python-modules/bluepy/default.nix diff --git a/pkgs/development/python-modules/bluepy/default.nix b/pkgs/development/python-modules/bluepy/default.nix new file mode 100644 index 00000000000..8d247b41d27 --- /dev/null +++ b/pkgs/development/python-modules/bluepy/default.nix @@ -0,0 +1,35 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, pkg-config +, glib +}: + +buildPythonPackage rec { + pname = "bluepy"; + version = "1.3.0"; + + 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" ]; + + meta = with stdenv.lib; { + description = "Python interface to Bluetooth LE on Linux"; + homepage = "https://github.com/IanHarvey/bluepy"; + maintainers = with maintainers; [ georgewhewell ]; + license = licenses.gpl2; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ddb4136f367..45cf2f3c05b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -518,6 +518,8 @@ in { blivet = callPackage ../development/python-modules/blivet { }; + bluepy = callPackage ../development/python-modules/bluepy { }; + boltons = callPackage ../development/python-modules/boltons { }; bravia-tv = callPackage ../development/python-modules/bravia-tv { };