From d81453d943f6740aaf093fbd87ec5d2796d881ae Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 5 Jun 2026 23:42:44 +0200 Subject: [PATCH] home-assistant: ignore install method deprecation --- pkgs/servers/home-assistant/default.nix | 3 +++ .../patches/nixos-was-never-supported.patch | 13 +++++++++++++ pkgs/servers/home-assistant/tests.nix | 4 ++++ 3 files changed, 20 insertions(+) create mode 100644 pkgs/servers/home-assistant/patches/nixos-was-never-supported.patch diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 93ac02e586ea..b21a1c68d836 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -317,6 +317,9 @@ python3Packages.buildPythonApplication rec { # No scaring our users about not running in a docker or a venv ./patches/pythonpath-is-a-venv.patch + # No scaring our users about our install method + ./patches/nixos-was-never-supported.patch + # Patch path to ffmpeg binary (replaceVars ./patches/ffmpeg-path.patch { ffmpeg = "${lib.getExe ffmpeg-headless}"; diff --git a/pkgs/servers/home-assistant/patches/nixos-was-never-supported.patch b/pkgs/servers/home-assistant/patches/nixos-was-never-supported.patch new file mode 100644 index 000000000000..7dacf9067c08 --- /dev/null +++ b/pkgs/servers/home-assistant/patches/nixos-was-never-supported.patch @@ -0,0 +1,13 @@ +diff --git a/homeassistant/components/homeassistant/__init__.py b/homeassistant/components/homeassistant/__init__.py +index 54c6454167b..026fda54578 100644 +--- a/homeassistant/components/homeassistant/__init__.py ++++ b/homeassistant/components/homeassistant/__init__.py +@@ -420,7 +420,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: # noqa: + + installation_type = info["installation_type"][15:] + if installation_type in {"Core", "Container"}: +- deprecated_method = installation_type == "Core" ++ deprecated_method = False + bit32 = _is_32_bit() + arch = info["arch"] + if bit32 and installation_type == "Container": diff --git a/pkgs/servers/home-assistant/tests.nix b/pkgs/servers/home-assistant/tests.nix index e172deb03a42..f75e253e8f17 100644 --- a/pkgs/servers/home-assistant/tests.nix +++ b/pkgs/servers/home-assistant/tests.nix @@ -130,6 +130,10 @@ let # [2026.6.1] AssertionError: assert is "test_usb_device_reactivity" ]; + homeassistant = [ + # disabled via nixos-was-never-supported.patch + "test_deprecated_installation_issue_core" + ]; opendisplay = [ # [2026.6.0] Failed: Description not found for placeholder `reason` in component.opendisplay.exceptions.device_not_found.message # https://github.com/home-assistant/core/pull/172909