Unverified Commit 543a969c authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #257240 from fabaff/ninebot-ble

python311Packages.ninebot-ble: init at 0.0.6
parents 91b94ab1 50b6184a
Loading
Loading
Loading
Loading
+47 −0
Original line number Diff line number Diff line
{ 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 ];
  };
}
+55 −0
Original line number Diff line number Diff line
{ 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 ];
  };
}
+4 −0
Original line number Diff line number Diff line
@@ -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 { };