From 50b6184a33783472bfefd28cfb5fe92062b52e5a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 26 Nov 2023 11:47:32 +0100 Subject: [PATCH] python311Packages.ninebot-ble: init at 0.0.6 Ninebot scooter BLE client https://github.com/ownbee/ninebot-ble --- .../python-modules/ninebot-ble/default.nix | 55 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/ninebot-ble/default.nix diff --git a/pkgs/development/python-modules/ninebot-ble/default.nix b/pkgs/development/python-modules/ninebot-ble/default.nix new file mode 100644 index 000000000000..c13d96fe700c --- /dev/null +++ b/pkgs/development/python-modules/ninebot-ble/default.nix @@ -0,0 +1,55 @@ +{ lib +, bleak +, bleak-retry-connector +, bluetooth-data-tools +, bluetooth-sensor-state-data +, buildPythonPackage +, fetchFromGitHub +, miauth +, pythonOlder +, setuptools +, wheel +}: + +buildPythonPackage rec { + pname = "ninebot-ble"; + version = "0.0.6"; + pyproject = true; + + disabled = pythonOlder "3.10"; + + src = fetchFromGitHub { + owner = "ownbee"; + repo = "ninebot-ble"; + rev = "refs/tags/${version}"; + hash = "sha256-gA3VTs45vVpO0Iy8MbvvDf9j99vsFzrkADaJEslx6y0="; + }; + + nativeBuildInputs = [ + setuptools + wheel + ]; + + propagatedBuildInputs = [ + bleak + bleak-retry-connector + bluetooth-data-tools + bluetooth-sensor-state-data + miauth + ]; + + # Module has no test + doCheck = false; + + pythonImportsCheck = [ + "ninebot_ble" + ]; + + meta = with lib; { + description = "Ninebot scooter BLE client"; + homepage = "https://github.com/ownbee/ninebot-ble"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} + diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d1ea81662a5e..f3dd9ec4da65 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7252,6 +7252,8 @@ self: super: with self; { nine = callPackage ../development/python-modules/nine { }; + ninebot-ble = callPackage ../development/python-modules/ninebot-ble { }; + ninja = callPackage ../development/python-modules/ninja { inherit (pkgs) ninja; }; nipy = callPackage ../development/python-modules/nipy { };