diff --git a/pkgs/development/python-modules/bluetooth-auto-recovery/default.nix b/pkgs/development/python-modules/bluetooth-auto-recovery/default.nix new file mode 100644 index 000000000000..33cf213ac157 --- /dev/null +++ b/pkgs/development/python-modules/bluetooth-auto-recovery/default.nix @@ -0,0 +1,55 @@ +{ lib +, async-timeout +, btsocket +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pyric +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "bluetooth-auto-recovery"; + version = "0.1.0"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "Bluetooth-Devices"; + repo = pname; + rev = "v${version}"; + hash = "sha256-TeE/s7DU3KI7TiQqayJbdhJdh7XvdNV17I8bwB+bvJ0="; + }; + + 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b53856abbd85..e5b65cc2e962 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -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 { };