diff options
Diffstat (limited to 'pkgs/servers/home-assistant/default.nix')
-rw-r--r-- | pkgs/servers/home-assistant/default.nix | 74 |
1 files changed, 31 insertions, 43 deletions
diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 7f6fca8a090b..3d76446d3406 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -30,24 +30,16 @@ let # Override the version of some packages pinned in Home Assistant's setup.py and requirements_all.txt (self: super: { - aioairq = super.aioairq.overridePythonAttrs (oldAttrs: rec { - version = "0.2.4"; - src = fetchFromGitHub { - owner = "CorantGmbH"; - repo = "aioairq"; - rev = "refs/tags/v${version}"; - hash = "sha256-+5FyBfsB3kjyX/V9CdZ072mZ3THyvALyym+uk7/kZLo="; - }; - }); - # https://github.com/home-assistant/core/pull/101913 aiohttp = super.aiohttp.overridePythonAttrs (old: rec { - version = "3.8.5"; + version = "3.9.1"; src = fetchPypi { inherit (old) pname; inherit version; - hash = "sha256-uVUuxSzBR9vxlErHrJivdgLlHqLc0HbtGUyjwNHH0Lw="; + hash = "sha256-j8Sah6wmnUUp2kWHHi/7aHTod3nD0OLM2BPAiZIhI50="; }; + patches = []; + doCheck = false; }); aiowatttime = super.aiowatttime.overridePythonAttrs (oldAttrs: rec { @@ -60,6 +52,15 @@ let }; }); + aioresponses = super.aioresponses.overridePythonAttrs (oldAttrs: rec { + pname = "aioresponses"; + version = "0.7.6"; + src = fetchPypi { + inherit pname version; + hash = "sha256-95XZ29otYXdIQOfjL1Nm9FdS0a3Bt0yTYq/QFylsfuE="; + }; + }); + astral = super.astral.overridePythonAttrs (oldAttrs: rec { pname = "astral"; version = "2.2"; @@ -105,10 +106,10 @@ let rev = "refs/tags/${version}"; hash = "sha256-iqlKfpnETLqQwy5sNcK2x/TgmuN2hCfYoHEFK2WWVXI="; }; - nativeBuildInputs = with super; [ + nativeBuildInputs = with self; [ setuptools ]; - propagatedBuildInputs = with super; [ + propagatedBuildInputs = with self; [ aenum aiohttp pydantic @@ -135,11 +136,6 @@ let }; }); - # moto tests are a nuissance - moto = super.moto.overridePythonAttrs (_: { - doCheck = false; - }); - notifications-android-tv = super.notifications-android-tv.overridePythonAttrs (oldAttrs: rec { version = "0.1.5"; format = "setuptools"; @@ -151,11 +147,11 @@ let hash = "sha256-adkcUuPl0jdJjkBINCTW4Kmc16C/HzL+jaRZB/Qr09A="; }; - nativeBuildInputs = with super; [ + nativeBuildInputs = with self; [ setuptools ]; - propagatedBuildInputs = with super; [ + propagatedBuildInputs = with self; [ requests ]; @@ -183,15 +179,6 @@ let }; }); - p1monitor = super.p1monitor.overridePythonAttrs (oldAttrs: rec { - version = "2.1.1"; - src = fetchFromGitHub { - inherit (oldAttrs.src) owner repo; - rev = "refs/tags/v${version}"; - hash = "sha256-VHY5AWxt5BZd1NQKzsgubEZBLKAlDNm8toyEazPUnDU="; - }; - }); - psutil = super.psutil.overridePythonAttrs (oldAttrs: rec { version = "5.9.6"; src = fetchPypi { @@ -324,7 +311,7 @@ let extraBuildInputs = extraPackages python.pkgs; # Don't forget to run parse-requirements.py after updating - hassVersion = "2023.11.3"; + hassVersion = "2023.12.1"; in python.pkgs.buildPythonApplication rec { pname = "homeassistant"; @@ -337,18 +324,18 @@ in python.pkgs.buildPythonApplication rec { # don't try and fail to strip 6600+ python files, it takes minutes! dontStrip = true; - # Primary source is the pypi sdist, because it contains translations - src = fetchPypi { - inherit pname version; - hash = "sha256-llGHI6LVpTo9m2RMtcDSkW2wWraje2OkVFx5P7lzZ30="; - }; - - # Secondary source is git for tests - gitSrc = fetchFromGitHub { + # Primary source is the git, which has the tests and allows bisecting the core + src = fetchFromGitHub { owner = "home-assistant"; repo = "core"; rev = "refs/tags/${version}"; - hash = "sha256-KD53O+UlAjGfVGp4kbLgpgU7j0A+KqZZT492WmeCOnQ="; + hash = "sha256-S9o1xhhqiSRan1BXnN0AndFPfLL0KqqH42WKOi3Yl+g="; + }; + + # Secondary source is pypi sdist for translations + sdist = fetchPypi { + inherit pname version; + hash = "sha256-e9OtUsluYlNBVmQ8u71dF0Q+wDdV8mvmYFdN8syl5rI="; }; nativeBuildInputs = with python.pkgs; [ @@ -378,10 +365,9 @@ in python.pkgs.buildPythonApplication rec { "yarl" ]; - # copy tests early, so patches apply as they would to the git repo + # extract translations from pypi sdist prePatch = '' - cp --no-preserve=mode --recursive ${gitSrc}/tests ./ - chmod u+x tests/auth/providers/test_command_line_cmd.sh + tar --extract --gzip --file $sdist --strip-components 1 --wildcards "**/translations" ''; # leave this in, so users don't have to constantly update their downstream patch handling @@ -481,6 +467,8 @@ in python.pkgs.buildPythonApplication rec { "--deselect tests/test_config.py::test_merge" # AssertionError: assert 'WARNING' not in '2023-11-10 ...nt abc[L]>\n'" "--deselect=tests/helpers/test_script.py::test_multiple_runs_repeat_choose" + # SystemError: PyThreadState_SetAsyncExc failed + "--deselect=tests/helpers/test_template.py::test_template_timeout" # tests are located in tests/ "tests" ]; |