From bb4f09b8a1feeb64e550985d32effc7d387139af Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 5 Sep 2022 09:27:49 +0200 Subject: [PATCH] python310Packages.bluemaestro-ble: init at 0.2.0 --- .../bluemaestro-ble/default.nix | 55 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/bluemaestro-ble/default.nix diff --git a/pkgs/development/python-modules/bluemaestro-ble/default.nix b/pkgs/development/python-modules/bluemaestro-ble/default.nix new file mode 100644 index 000000000000..518a1c580a95 --- /dev/null +++ b/pkgs/development/python-modules/bluemaestro-ble/default.nix @@ -0,0 +1,55 @@ +{ lib +, bluetooth-data-tools +, bluetooth-sensor-state-data +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytestCheckHook +, pythonOlder +, sensor-state-data +}: + +buildPythonPackage rec { + pname = "bluemaestro-ble"; + version = "0.2.0"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "Bluetooth-Devices"; + repo = pname; + rev = "v${version}"; + hash = "sha256-lJYbbF6b1CazD/aVTNoZvyfH/XQf5jWBsddDdrP+FKA="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + bluetooth-data-tools + bluetooth-sensor-state-data + sensor-state-data + ]; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace " --cov=bluemaestro_ble --cov-report=term-missing:skip-covered" "" + ''; + + pythonImportsCheck = [ + "bluemaestro_ble" + ]; + + meta = with lib; { + description = "Library for bluemaestro BLE devices"; + homepage = "https://github.com/Bluetooth-Devices/bluemaestro-ble"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0e88b141da54..14f7f897c692 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1402,6 +1402,8 @@ in { blspy = callPackage ../development/python-modules/blspy { }; + bluemaestro-ble = callPackage ../development/python-modules/bluemaestro-ble { }; + bluepy = callPackage ../development/python-modules/bluepy { }; bluepy-devices = callPackage ../development/python-modules/bluepy-devices { };