diff --git a/pkgs/development/python-modules/aiooui/default.nix b/pkgs/development/python-modules/aiooui/default.nix new file mode 100644 index 000000000000..d26385e284b0 --- /dev/null +++ b/pkgs/development/python-modules/aiooui/default.nix @@ -0,0 +1,53 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytest-asyncio +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "aiooui"; + version = "0.1.5"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "Bluetooth-Devices"; + repo = "aiooui"; + rev = "refs/tags/v${version}"; + hash = "sha256-/RZ8nZatlfo3AJvg/4JgyAHtrnoj50uxbhqr+ToCTJ4="; + }; + + postPatch = '' + # Remove requirements and build part for the OUI data + substituteInPlace pyproject.toml \ + --replace-fail "-v -Wdefault --cov=aiooui --cov-report=term-missing:skip-covered" "" \ + --replace-fail 'script = "build_oui.py"' "" \ + --replace-fail ", 'requests'" "" \ + --replace-fail '"setuptools>=65.4.1", ' "" + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ + "aiooui" + ]; + + meta = with lib; { + description = "Async OUI lookups"; + homepage = "https://github.com/Bluetooth-Devices/aiooui"; + changelog = "https://github.com/Bluetooth-Devices/aiooui/blob/${version}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/bluetooth-adapters/default.nix b/pkgs/development/python-modules/bluetooth-adapters/default.nix index 765f4340ceb9..cf6924f2f3d6 100644 --- a/pkgs/development/python-modules/bluetooth-adapters/default.nix +++ b/pkgs/development/python-modules/bluetooth-adapters/default.nix @@ -1,23 +1,24 @@ { lib -, buildPythonPackage -, pythonOlder -, fetchFromGitHub -, poetry-core , aiohttp +, aiooui , async-timeout , bleak +, buildPythonPackage , dbus-fast +, fetchFromGitHub , mac-vendor-lookup , myst-parser +, poetry-core , pytestCheckHook -, sphinxHook +, pythonOlder , sphinx-rtd-theme +, sphinxHook , usb-devices }: buildPythonPackage rec { pname = "bluetooth-adapters"; - version = "0.17.0"; + version = "0.18.0"; pyproject = true; disabled = pythonOlder "3.9"; @@ -26,7 +27,7 @@ buildPythonPackage rec { owner = "Bluetooth-Devices"; repo = "bluetooth-adapters"; rev = "refs/tags/v${version}"; - hash = "sha256-7j55+bCScoqtYJ/1lmqsPk3j+dbs+VfPTzTiwdVg0Pw="; + hash = "sha256-KPmCOPCK7muT0qptJMKQwWU/6tvepkdHwlNYcrvpRLg="; }; postPatch = '' @@ -48,6 +49,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ aiohttp + aiooui async-timeout bleak dbus-fast @@ -65,7 +67,7 @@ buildPythonPackage rec { meta = with lib; { description = "Tools to enumerate and find Bluetooth Adapters"; - homepage = "https://bluetooth-adapters.readthedocs.io/"; + homepage = "https://github.com/Bluetooth-Devices/bluetooth-adapters"; changelog = "https://github.com/bluetooth-devices/bluetooth-adapters/blob/v${version}/CHANGELOG.md"; license = licenses.asl20; maintainers = teams.home-assistant.members; diff --git a/pkgs/development/python-modules/ibeacon-ble/default.nix b/pkgs/development/python-modules/ibeacon-ble/default.nix index 1f0f799d587f..acbc955f1089 100644 --- a/pkgs/development/python-modules/ibeacon-ble/default.nix +++ b/pkgs/development/python-modules/ibeacon-ble/default.nix @@ -1,5 +1,6 @@ { lib , aiohttp +, aiooui , buildPythonPackage , fetchFromGitHub , home-assistant-bluetooth @@ -11,21 +12,21 @@ buildPythonPackage rec { pname = "ibeacon-ble"; - version = "1.0.1"; - format = "pyproject"; + version = "1.2.0"; + pyproject = true; disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "Bluetooth-Devices"; - repo = pname; + repo = "ibeacon-ble"; rev = "refs/tags/v${version}"; - hash = "sha256-iYgGflM0IpSIMNgPpJAFAl9FYoMfRinM3sP6VRcBSMc="; + hash = "sha256-1liSWxduYpjIMu7226EH4bsc7gca5g/fyL79W4ZMdU4="; }; postPatch = '' substituteInPlace pyproject.toml \ - --replace " --cov=ibeacon_ble --cov-report=term-missing:skip-covered" "" + --replace-fail " --cov=ibeacon_ble --cov-report=term-missing:skip-covered" "" ''; nativeBuildInputs = [ @@ -34,6 +35,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ aiohttp + aiooui home-assistant-bluetooth mac-vendor-lookup ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8408bb0193e9..e9c17c56c129 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -331,6 +331,8 @@ self: super: with self; { aiooss2 = callPackage ../development/python-modules/aiooss2 { }; + aiooui = callPackage ../development/python-modules/aiooui { }; + aiopegelonline = callPackage ../development/python-modules/aiopegelonline { }; aiopg = callPackage ../development/python-modules/aiopg { };