diff --git a/pkgs/development/python-modules/oralb-ble/default.nix b/pkgs/development/python-modules/oralb-ble/default.nix new file mode 100644 index 000000000000..8905529f6dec --- /dev/null +++ b/pkgs/development/python-modules/oralb-ble/default.nix @@ -0,0 +1,55 @@ +{ lib +, bluetooth-data-tools +, bluetooth-sensor-state-data +, buildPythonPackage +, fetchFromGitHub +, home-assistant-bluetooth +, poetry-core +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "oralb-ble"; + version = "0.10.1"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "Bluetooth-Devices"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-Iuu44H8fCbJysoSJLBtlJ1XE5Ad2caWihj3UZytWK3o="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + bluetooth-data-tools + bluetooth-sensor-state-data + home-assistant-bluetooth + ]; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace " --cov=oralb_ble --cov-report=term-missing:skip-covered" "" + ''; + + pythonImportsCheck = [ + "oralb_ble" + ]; + + meta = with lib; { + description = "Library for Oral B BLE devices"; + homepage = "https://github.com/Bluetooth-Devices/oralb-ble"; + 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 f7a6becb23a1..9ea30fb92d97 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6486,6 +6486,8 @@ self: super: with self; { opuslib = callPackage ../development/python-modules/opuslib { }; + oralb-ble = callPackage ../development/python-modules/oralb-ble { }; + orderedmultidict = callPackage ../development/python-modules/orderedmultidict { }; ordered-set = callPackage ../development/python-modules/ordered-set { };