Unverified Commit 25d1a650 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #187705 from fabaff/bluetooth-auto-recovery

python310Packages.bluetooth-auto-recovery: init at 0.1.0
parents 02a65565 821e5c65
Loading
Loading
Loading
Loading
+55 −0
Original line number Diff line number Diff line
{ lib
, async-timeout
, btsocket
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pyric
, pytestCheckHook
, pythonOlder
}:

buildPythonPackage rec {
  pname = "bluetooth-auto-recovery";
  version = "0.2.2";
  format = "pyproject";

  disabled = pythonOlder "3.9";

  src = fetchFromGitHub {
    owner = "Bluetooth-Devices";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-Td7LT5C7ho/fIT2gnkPA0LLXHtzDjbYAopE4ECTfFKQ=";
  };

  nativeBuildInputs = [
    poetry-core
  ];

  propagatedBuildInputs = [
    async-timeout
    btsocket
    pyric
  ];

  checkInputs = [
    pytestCheckHook
  ];

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace " --cov=bluetooth_auto_recovery --cov-report=term-missing:skip-covered" ""
  '';

  pythonImportsCheck = [
    "bluetooth_auto_recovery"
  ];

  meta = with lib; {
    description = "Library for recovering Bluetooth adapters";
    homepage = "https://github.com/Bluetooth-Devices/bluetooth-auto-recovery";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ fab ];
  };
}
+36 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
}:

buildPythonPackage rec {
  pname = "btsocket";
  version = "0.2.0";
  format = "setuptools";

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "ukBaz";
    repo = "python-btsocket";
    rev = "v${version}";
    hash = "sha256-IqlbFYbEyJPlcmT3DIQIwsjQEAGeIGRtFNx4jWwNtjE=";
  };

  checkInputs = [
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "btsocket"
  ];

  meta = with lib; {
    description = "Library to interact with the Bluez Bluetooth Management API";
    homepage = "https://github.com/ukBaz/python-btsocket";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ fab ];
  };
}
+38 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
}:

buildPythonPackage rec {
  pname = "pyric";
  version = "0.1.6.3";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    pname = "PyRIC";
    inherit version;
    hash = "sha256-tTmwHK/r0kBsAAl/lFJeoPjs0d2S93MfQ+rA7xbCzMk=";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace "__version__ = '0.0.3'" "__version__ = '${version}'"
  '';

  # Tests are outdated
  doCheck = false;

  pythonImportsCheck = [
    "pyric"
  ];

  meta = with lib; {
    description = "Python Radio Interface Controller";
    homepage = "https://github.com/wraith-wireless/PyRIC";
    license = with licenses; [ gpl3Plus ];
    maintainers = with maintainers; [ fab ];
  };
}
+6 −0
Original line number Diff line number Diff line
@@ -1403,6 +1403,8 @@ in {

  bluetooth-adapters = callPackage ../development/python-modules/bluetooth-adapters { };

  bluetooth-auto-recovery = callPackage ../development/python-modules/bluetooth-auto-recovery { };

  bluetooth-data-tools= callPackage ../development/python-modules/bluetooth-data-tools { };

  bluetooth-sensor-state-data = callPackage ../development/python-modules/bluetooth-sensor-state-data { };
@@ -1516,6 +1518,8 @@ in {

  btrfsutil = toPythonModule (pkgs.btrfs-progs.override { python3 = self.python; });

  btsocket = callPackage ../development/python-modules/btsocket { };

  bucketstore = callPackage ../development/python-modules/bucketstore { };

  bugsnag = callPackage ../development/python-modules/bugsnag { };
@@ -8228,6 +8232,8 @@ in {

  pyres = callPackage ../development/python-modules/pyres { };

  pyric = callPackage ../development/python-modules/pyric { };

  pyrisco = callPackage ../development/python-modules/pyrisco { };

  pyrituals = callPackage ../development/python-modules/pyrituals { };