Merge pull request #257240 from fabaff/ninebot-ble

python311Packages.ninebot-ble: init at 0.0.6
This commit is contained in:
Fabian Affolter 2023-11-26 16:03:45 +01:00 committed by GitHub
commit 543a969c7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 106 additions and 0 deletions

View File

@ -0,0 +1,47 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, wheel
, bluepy
, pythonOlder
, cryptography
}:
buildPythonPackage rec {
pname = "miauth";
version = "0.9.1";
pyproject = true;
disabled = pythonOlder "3.10";
src = fetchFromGitHub {
owner = "dnandha";
repo = "miauth";
# Release is not tagged properly, https://github.com/dnandha/miauth/issues/15
# rev = "refs/tags/${version}";
rev = "refs/tags/release";
hash = "sha256-+aoY0Eyd9y7xQTA3uSC6YIZisViilsHlFaOXmhPMcBY=";
};
nativeBuildInputs = [
setuptools
wheel
];
propagatedBuildInputs = [
bluepy
cryptography
];
pythonImportsCheck = [
"miauth"
];
meta = with lib; {
description = "Authenticate and interact with Xiaomi devices over BLE";
homepage = "https://github.com/dnandha/miauth";
license = licenses.agpl3Only;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -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 ];
};
}

View File

@ -6838,6 +6838,8 @@ self: super: with self; {
mhcgnomes = callPackage ../development/python-modules/mhcgnomes { };
miauth = callPackage ../development/python-modules/miauth { };
micawber = callPackage ../development/python-modules/micawber { };
microdata = callPackage ../development/python-modules/microdata { };
@ -8153,6 +8155,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 { };