diff options
Diffstat (limited to 'pkgs/servers/home-assistant/default.nix')
-rw-r--r-- | pkgs/servers/home-assistant/default.nix | 49 |
1 files changed, 32 insertions, 17 deletions
diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index e192c3c4d6336..400e0da3970fc 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -1,7 +1,6 @@ { stdenv , lib , fetchFromGitHub -, fetchpatch , python3 , nixosTests @@ -51,6 +50,21 @@ let (mkOverride "pykmtronic" "0.0.3" "sha256-8bxn27DU1XUQUxQFJklEge29DHx1DMu7pJG4hVE1jDU=") + # Pinned due to API changes in pylilterbot>=2021.3.0 + (self: super: { + pylitterbot = super.pylitterbot.overridePythonAttrs (oldAttrs: rec { + version = "2021.2.8"; + src = fetchFromGitHub { + owner = "natekspencer"; + repo = "pylitterbot"; + rev = version; + sha256 = "142lhijm51v11cd0lhcfdnjdd143jxi2hjsrqdq0rrbbnmj6mymp"; + }; + # had no tests before 2021.3.0 + doCheck = false; + }); + }) + # Pinned due to bug in ring-doorbell 0.7.0 # https://github.com/tchellomello/python-ring-doorbell/issues/240 (mkOverride "ring-doorbell" "0.6.2" @@ -89,7 +103,7 @@ let extraBuildInputs = extraPackages py.pkgs; # Don't forget to run parse-requirements.py after updating - hassVersion = "2021.3.4"; + hassVersion = "2021.4.0"; in with py.pkgs; buildPythonApplication rec { pname = "homeassistant"; @@ -108,32 +122,22 @@ in with py.pkgs; buildPythonApplication rec { owner = "home-assistant"; repo = "core"; rev = version; - sha256 = "110pvin39lr40zd3lhb8zvh2wafl0k0dy3nbmc483yafy31xa4kw"; + sha256 = "1gkbkyxqsw3isdyskzi0ib07fgqvirnr20jkhrz86vl0k9ix8hwf"; }; # leave this in, so users don't have to constantly update their downstream patch handling patches = [ - (fetchpatch { - # Fix I-frame interval in stream test video - # https://github.com/home-assistant/core/pull/47638 - url = "https://github.com/home-assistant/core/commit/d9bf63103fde44ddd38fb6b9a510d82609802b36.patch"; - sha256 = "1y34cmw9zqb2lxyzm0q7vxlm05wwz76mhysgnh1jn39484fn9f9m"; - }) ]; postPatch = '' substituteInPlace setup.py \ - --replace "aiohttp==3.7.4" "aiohttp>=3.7.3" \ - --replace "attrs==19.3.0" "attrs>=19.3.0" \ - --replace "awesomeversion==21.2.3" "awesomeversion>=21.2.3" \ - --replace "bcrypt==3.1.7" "bcrypt>=3.1.7" \ + --replace "awesomeversion==21.2.3" "awesomeversion" \ + --replace "bcrypt==3.1.7" "bcrypt" \ --replace "cryptography==3.3.2" "cryptography" \ - --replace "httpx==0.16.1" "httpx>=0.16.1" \ - --replace "jinja2>=2.11.3" "jinja2>=2.11.2" \ --replace "pip>=8.0.3,<20.3" "pip" \ - --replace "pytz>=2021.1" "pytz>=2020.5" \ + --replace "pytz>=2021.1" "pytz" \ --replace "pyyaml==5.4.1" "pyyaml" \ - --replace "ruamel.yaml==0.15.100" "ruamel.yaml>=0.15.100" + --replace "ruamel.yaml==0.15.100" "ruamel.yaml" substituteInPlace tests/test_config.py --replace '"/usr"' '"/build/media"' ''; @@ -187,6 +191,7 @@ in with py.pkgs; buildPythonApplication rec { componentTests = [ "accuweather" "airly" + "analytics" "alert" "api" "auth" @@ -239,6 +244,7 @@ in with py.pkgs; buildPythonApplication rec { "hddtemp" "history" "history_stats" + "home_plus_control" "homekit" "homekit_controller" "homeassistant" @@ -261,6 +267,7 @@ in with py.pkgs; buildPythonApplication rec { "ipp" "kmtronic" "light" + "litterrobot" "local_file" "local_ip" "lock" @@ -306,6 +313,7 @@ in with py.pkgs; buildPythonApplication rec { "rss_feed_template" "safe_mode" "scene" + "screenlogic" "script" "search" "shell_command" @@ -336,6 +344,7 @@ in with py.pkgs; buildPythonApplication rec { "time_date" "timer" "tod" + "trace" "tts" "universal" "updater" @@ -365,6 +374,8 @@ in with py.pkgs; buildPythonApplication rec { "--dist loadfile" # tests are located in tests/ "tests" + # screenlogic/test_config_flow.py: Tries to send out UDP broadcasts + "--deselect tests/components/screenlogic/test_config_flow.py::test_form_cannot_connect" # dynamically add packages required for component tests ] ++ map (component: "tests/components/" + component) componentTests; @@ -387,9 +398,13 @@ in with py.pkgs; buildPythonApplication rec { # generic/test_camera.py: AssertionError: 500 == 200 "test_fetching_without_verify_ssl" "test_fetching_url_with_verify_ssl" + # util/test_package.py: AssertionError on package.is_installed('homeassistant>=999.999.999') + "test_check_package_version_does_not_match" ]; preCheck = '' + export HOME="$TEMPDIR" + # the tests require the existance of a media dir mkdir /build/media |