summaryrefslogtreecommitdiffstats
path: root/pkgs/development
diff options
context:
space:
mode:
authorJonas Heinrich <onny@project-insanity.org>2022-09-06 15:48:07 +0200
committerGitHub <noreply@github.com>2022-09-06 15:48:07 +0200
commit28fbee01ae8672a93c8ae36a4e05ad0803c91bd8 (patch)
treec08ed44715b22361b1b63c19793468fee819aef6 /pkgs/development
parent8bab1dbfcde67967b7db0bad55a35a6fa5f94c95 (diff)
parentbb4f09b8a1feeb64e550985d32effc7d387139af (diff)
Merge pull request #189970 from fabaff/bluemeastro-ble
python310Packages.bluemaestro-ble: init at 0.2.0
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/bluemaestro-ble/default.nix55
1 files changed, 55 insertions, 0 deletions
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 ];
+ };
+}