From f9dcabf0127b3e6540c40026e3e2ddf986bbc9d3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 3 Mar 2024 20:11:16 +0100 Subject: [PATCH 1/3] python311Packages.aiooui: init at 0.1.5 Async OUI lookups https://github.com/Bluetooth-Devices/aiooui --- .../python-modules/aiooui/default.nix | 53 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 55 insertions(+) create mode 100644 pkgs/development/python-modules/aiooui/default.nix 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/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7bc514fc7e58..010a4f79b4f6 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 { }; From 46fe45cf256b5903128d5d2ef9a7afeeb879ef3d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 3 Mar 2024 20:13:47 +0100 Subject: [PATCH 2/3] python311Packages.bluetooth-adapters: 0.17.0 -> 0.18.0 Diff: https://github.com/Bluetooth-Devices/bluetooth-adapters/compare/refs/tags/v0.17.0...v0.18.0 Changelog: https://github.com/bluetooth-devices/bluetooth-adapters/blob/v0.18.0/CHANGELOG.md --- .../bluetooth-adapters/default.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) 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; From 139eb03b715b56eb5c27eae7076e3f44ce1476c8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 3 Mar 2024 20:15:50 +0100 Subject: [PATCH 3/3] python311Packages.ibeacon-ble: 1.0.1 -> 1.2.0 Diff: https://github.com/Bluetooth-Devices/ibeacon-ble/compare/refs/tags/v1.0.1...v1.2.0 Changelog: https://github.com/Bluetooth-Devices/ibeacon-ble/blob/v1.2.0/CHANGELOG.md --- .../python-modules/ibeacon-ble/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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 ];