summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2021-07-08 02:38:18 +0200
committerMartin Weinelt <hexa@darmstadt.ccc.de>2021-07-23 00:27:16 +0200
commit92b738ad790da95a07160a16f85c0ca70965285e (patch)
tree3fbb34178b3fee263f3b46bf60076ab62bcc94cb /pkgs
parent7553e11825b73baef9f3ad27308b3ddb2c17e860 (diff)
downloadnixpkgs-92b738ad790da95a07160a16f85c0ca70965285e.tar
nixpkgs-92b738ad790da95a07160a16f85c0ca70965285e.tar.gz
nixpkgs-92b738ad790da95a07160a16f85c0ca70965285e.tar.bz2
nixpkgs-92b738ad790da95a07160a16f85c0ca70965285e.tar.lz
nixpkgs-92b738ad790da95a07160a16f85c0ca70965285e.tar.xz
nixpkgs-92b738ad790da95a07160a16f85c0ca70965285e.tar.zst
nixpkgs-92b738ad790da95a07160a16f85c0ca70965285e.zip
home-assistant: 2021.6.6 -> 2021.7.0
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/servers/home-assistant/0001-tests-ignore-OSErrors-in-hass-fixture.patch27
-rw-r--r--pkgs/servers/home-assistant/component-packages.nix25
-rw-r--r--pkgs/servers/home-assistant/default.nix52
-rw-r--r--pkgs/servers/home-assistant/frontend.nix4
-rwxr-xr-xpkgs/servers/home-assistant/update.sh8
5 files changed, 69 insertions, 47 deletions
diff --git a/pkgs/servers/home-assistant/0001-tests-ignore-OSErrors-in-hass-fixture.patch b/pkgs/servers/home-assistant/0001-tests-ignore-OSErrors-in-hass-fixture.patch
new file mode 100644
index 00000000000..add0ea1d552
--- /dev/null
+++ b/pkgs/servers/home-assistant/0001-tests-ignore-OSErrors-in-hass-fixture.patch
@@ -0,0 +1,27 @@
+From 3e3f5c37252a33ea1e71c39f2ca0f13940c261ad Mon Sep 17 00:00:00 2001
+From: Martin Weinelt <hexa@darmstadt.ccc.de>
+Date: Sat, 17 Jul 2021 16:11:23 +0200
+Subject: [PATCH] tests: ignore OSErrors in hass fixture
+
+The nix sandbox will cause OSErrors due to limitations imposed on
+network interaction. This change makes it so we forgive these cases.
+---
+ tests/conftest.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tests/conftest.py b/tests/conftest.py
+index 1f5ffc80d0..b284727a0f 100644
+--- a/tests/conftest.py
++++ b/tests/conftest.py
+@@ -168,6 +168,8 @@ def hass(loop, load_registries, hass_storage, request):
+             continue
+         if isinstance(ex, ServiceNotFound):
+             continue
++        if isinstance(ex, OSError):
++            continue
+         raise ex
+ 
+ 
+-- 
+2.32.0
+
diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix
index 675d9b43757..2190bd6b278 100644
--- a/pkgs/servers/home-assistant/component-packages.nix
+++ b/pkgs/servers/home-assistant/component-packages.nix
@@ -2,7 +2,7 @@
 # Do not edit!
 
 {
-  version = "2021.6.6";
+  version = "2021.7.0";
   components = {
     "abode" = ps: with ps; [ abodepy ];
     "accuweather" = ps: with ps; [ accuweather ];
@@ -27,6 +27,7 @@
     "almond" = ps: with ps; [ aiohttp-cors pyalmond ];
     "alpha_vantage" = ps: with ps; [ alpha-vantage ];
     "amazon_polly" = ps: with ps; [ boto3 ];
+    "ambee" = ps: with ps; [ ambee ];
     "ambiclimate" = ps: with ps; [ aiohttp-cors ambiclimate ];
     "ambient_station" = ps: with ps; [ aioambient ];
     "amcrest" = ps: with ps; [ amcrest ha-ffmpeg ];
@@ -90,7 +91,7 @@
     "blueprint" = ps: with ps; [ ];
     "bluesound" = ps: with ps; [ xmltodict ];
     "bluetooth_le_tracker" = ps: with ps; [ pygatt ];
-    "bluetooth_tracker" = ps: with ps; [ bt_proximity pybluez ];
+    "bluetooth_tracker" = ps: with ps; [ bt-proximity pybluez ];
     "bme280" = ps: with ps; [ smbus-cffi ]; # missing inputs: i2csense
     "bme680" = ps: with ps; [ bme680 smbus-cffi ];
     "bmp280" = ps: with ps; [ ]; # missing inputs: RPi.GPIO adafruit-circuitpython-bmp280
@@ -157,7 +158,7 @@
     "deconz" = ps: with ps; [ pydeconz ];
     "decora" = ps: with ps; [ bluepy ]; # missing inputs: decora
     "decora_wifi" = ps: with ps; [ ]; # missing inputs: decora_wifi
-    "default_config" = ps: with ps; [ pynacl aiodiscover aiohttp-cors async-upnp-client defusedxml distro emoji hass-nabucasa home-assistant-frontend ifaddr netdisco pillow scapy sqlalchemy zeroconf ];
+    "default_config" = ps: with ps; [ pynacl aiodiscover aiohttp-cors async-upnp-client defusedxml distro emoji hass-nabucasa home-assistant-frontend ifaddr pillow scapy sqlalchemy zeroconf ];
     "delijn" = ps: with ps; [ pydelijn ];
     "deluge" = ps: with ps; [ deluge-client ];
     "demo" = ps: with ps; [ aiohttp-cors ];
@@ -276,6 +277,7 @@
     "folder" = ps: with ps; [ ];
     "folder_watcher" = ps: with ps; [ watchdog ];
     "foobot" = ps: with ps; [ foobot-async ];
+    "forecast_solar" = ps: with ps; [ forecast-solar ];
     "forked_daapd" = ps: with ps; [ ]; # missing inputs: pyforked-daapd pylibrespot-java
     "fortios" = ps: with ps; [ fortiosapi ];
     "foscam" = ps: with ps; [ libpyfoscam ];
@@ -283,7 +285,8 @@
     "free_mobile" = ps: with ps; [ ]; # missing inputs: freesms
     "freebox" = ps: with ps; [ freebox-api ];
     "freedns" = ps: with ps; [ ];
-    "fritz" = ps: with ps; [ fritzconnection ];
+    "freedompro" = ps: with ps; [ pyfreedompro ];
+    "fritz" = ps: with ps; [ aiohttp-cors fritzconnection fritzprofiles ifaddr xmltodict ];
     "fritzbox" = ps: with ps; [ pyfritzhome ];
     "fritzbox_callmonitor" = ps: with ps; [ fritzconnection ];
     "fritzbox_netmonitor" = ps: with ps; [ fritzconnection ];
@@ -520,6 +523,7 @@
     "mochad" = ps: with ps; [ ]; # missing inputs: pymochad
     "modbus" = ps: with ps; [ pymodbus ];
     "modem_callerid" = ps: with ps; [ ]; # missing inputs: basicmodem
+    "modern_forms" = ps: with ps; [ aiomodernforms ];
     "mold_indicator" = ps: with ps; [ ];
     "monoprice" = ps: with ps; [ ]; # missing inputs: pymonoprice
     "moon" = ps: with ps; [ ];
@@ -732,6 +736,7 @@
     "scsgate" = ps: with ps; [ ]; # missing inputs: scsgate
     "search" = ps: with ps; [ aiohttp-cors ];
     "season" = ps: with ps; [ ephem ];
+    "select" = ps: with ps; [ ];
     "sendgrid" = ps: with ps; [ sendgrid ];
     "sense" = ps: with ps; [ sense-energy ];
     "sensehat" = ps: with ps; [ ]; # missing inputs: sense-hat
@@ -742,7 +747,7 @@
     "serial_pm" = ps: with ps; [ pmsensor ];
     "sesame" = ps: with ps; [ ]; # missing inputs: pysesame2
     "seven_segments" = ps: with ps; [ pillow ];
-    "seventeentrack" = ps: with ps; [ ]; # missing inputs: py17track
+    "seventeentrack" = ps: with ps; [ py17track ];
     "sharkiq" = ps: with ps; [ sharkiqpy ];
     "shell_command" = ps: with ps; [ ];
     "shelly" = ps: with ps; [ aioshelly ];
@@ -788,7 +793,7 @@
     "somfy_mylink" = ps: with ps; [ somfy-mylink-synergy ];
     "sonarr" = ps: with ps; [ sonarr ];
     "songpal" = ps: with ps; [ python-songpal ];
-    "sonos" = ps: with ps; [ aiohttp-cors plexapi plexauth plexwebsocket pysonos ];
+    "sonos" = ps: with ps; [ aiohttp-cors async-upnp-client defusedxml ifaddr plexapi plexauth plexwebsocket pysonos zeroconf ];
     "sony_projector" = ps: with ps; [ ]; # missing inputs: pysdcp
     "soundtouch" = ps: with ps; [ aiohttp-cors ifaddr libsoundtouch zeroconf ];
     "spaceapi" = ps: with ps; [ aiohttp-cors ];
@@ -800,7 +805,7 @@
     "sql" = ps: with ps; [ sqlalchemy ];
     "squeezebox" = ps: with ps; [ pysqueezebox ];
     "srp_energy" = ps: with ps; [ srpenergy ];
-    "ssdp" = ps: with ps; [ aiohttp-cors async-upnp-client defusedxml ifaddr netdisco zeroconf ];
+    "ssdp" = ps: with ps; [ aiohttp-cors async-upnp-client defusedxml ifaddr zeroconf ];
     "starline" = ps: with ps; [ starline ];
     "starlingbank" = ps: with ps; [ ]; # missing inputs: starlingbank
     "startca" = ps: with ps; [ xmltodict ];
@@ -907,7 +912,7 @@
     "upc_connect" = ps: with ps; [ connect-box ];
     "upcloud" = ps: with ps; [ upcloud-api ];
     "updater" = ps: with ps; [ distro ];
-    "upnp" = ps: with ps; [ async-upnp-client ];
+    "upnp" = ps: with ps; [ aiohttp-cors async-upnp-client defusedxml ifaddr zeroconf ];
     "uptime" = ps: with ps; [ ];
     "uptimerobot" = ps: with ps; [ ]; # missing inputs: pyuptimerobot
     "uscis" = ps: with ps; [ ]; # missing inputs: uscisstatus
@@ -972,13 +977,13 @@
     "xeoma" = ps: with ps; [ pyxeoma ];
     "xiaomi" = ps: with ps; [ ha-ffmpeg ];
     "xiaomi_aqara" = ps: with ps; [ pyxiaomigateway aiohttp-cors ifaddr netdisco zeroconf ];
-    "xiaomi_miio" = ps: with ps; [ construct python-miio ];
+    "xiaomi_miio" = ps: with ps; [ construct micloud python-miio ];
     "xiaomi_tv" = ps: with ps; [ pymitv ];
     "xmpp" = ps: with ps; [ slixmpp ];
     "xs1" = ps: with ps; [ ]; # missing inputs: xs1-api-client
     "yale_smart_alarm" = ps: with ps; [ yalesmartalarmclient ];
     "yamaha" = ps: with ps; [ rxv ];
-    "yamaha_musiccast" = ps: with ps; [ ]; # missing inputs: pymusiccast
+    "yamaha_musiccast" = ps: with ps; [ aiomusiccast ];
     "yandex_transport" = ps: with ps; [ aioymaps ];
     "yandextts" = ps: with ps; [ ];
     "yeelight" = ps: with ps; [ yeelight ];
diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix
index c9a4a15a87c..36af74cc162 100644
--- a/pkgs/servers/home-assistant/default.nix
+++ b/pkgs/servers/home-assistant/default.nix
@@ -22,19 +22,7 @@
 let
   defaultOverrides = [
     # Override the version of some packages pinned in Home Assistant's setup.py and requirements_all.txt
-
-    # Pinned due to API changes in aiopvpc>=2.2.0, remove after 2021.7.0
-    (self: super: {
-      aiopvpc = super.aiopvpc.overridePythonAttrs (oldAttr: rec {
-        version = "2.1.2";
-        src = fetchFromGitHub {
-          owner = "azogue";
-          repo = "aiopvpc";
-          rev = "v${version}";
-          sha256 = "0s8ki46dh39kw6qvsjcfcxa0gblyi33m3hry137kbi4lw5ws6qhr";
-        };
-      });
-    })
+    (mkOverride "python-slugify" "4.0.1" "69a517766e00c1268e5bbfc0d010a0a8508de0b18d30ad5a1ff357f8ae724270")
 
     # Pinned due to API changes in iaqualink>=2.0, remove after
     # https://github.com/home-assistant/core/pull/48137 was merged
@@ -70,19 +58,6 @@ let
     (mkOverride "ring-doorbell" "0.6.2"
       "fbd537722a27b3b854c26506d894b7399bb8dc57ff36083285971227a2d46560")
 
-    # Pinned due to API changes in pyatmo>=5.1.0
-    (self: super: {
-      pyatmo = super.pyatmo.overridePythonAttrs (oldAttrs: rec {
-        version = "5.0.1";
-        src = fetchFromGitHub {
-          owner = "jabesq";
-          repo = "pyatmo";
-          rev = "v${version}";
-          sha256 = "0can9v602iqfn0l01fd7gr63qzvcngfm0qka4s1x0pldh6avxmfh";
-        };
-      });
-    })
-
     # Pinned due to API changes in pyatv>=0.8.0
     (self: super: {
       pyatv = super.pyatv.overridePythonAttrs (olAttrs: rec {
@@ -149,8 +124,6 @@ let
       });
     })
 
-    (mkOverride "pysma" "0.4.3" "sha256-vriMnJFS7yfTyDT1f4sx1xEBTQjqc4ZHmkdHp1vcd+Q=")
-
     # Pinned due to API changes in eebrightbox>=0.0.5
     (self: super: {
       eebrightbox = super.eebrightbox.overridePythonAttrs (oldAttrs: rec {
@@ -197,7 +170,7 @@ let
   extraBuildInputs = extraPackages py.pkgs;
 
   # Don't forget to run parse-requirements.py after updating
-  hassVersion = "2021.6.6";
+  hassVersion = "2021.7.0";
 
 in with py.pkgs; buildPythonApplication rec {
   pname = "homeassistant";
@@ -214,11 +187,12 @@ in with py.pkgs; buildPythonApplication rec {
     owner = "home-assistant";
     repo = "core";
     rev = version;
-    sha256 = "0r8l2qya9pdl65kq3xrnb1vhmbnxm3bj12hn1wyxmw56l8m9l5d5";
+    sha256 = "1dx1pmi0w265pyajmmvd7k6vb5z7s77a7b161zd0n4zsb989dil6";
   };
 
   # leave this in, so users don't have to constantly update their downstream patch handling
   patches = [
+    ./0001-tests-ignore-OSErrors-in-hass-fixture.patch
   ];
 
   postPatch = ''
@@ -673,7 +647,8 @@ in with py.pkgs; buildPythonApplication rec {
     "somfy_mylink"
     "sonarr"
     "songpal"
-    "sonos"
+    # disable sonos components test because they rely on ssdp, which doesn't work in our sandbox
+    # "sonos"
     "soundtouch"
     "spaceapi"
     "speedtestdotnet"
@@ -735,7 +710,8 @@ in with py.pkgs; buildPythonApplication rec {
     "upb"
     "upcloud"
     "updater"
-    "upnp"
+    # disabled, because it tries to join a multicast group and fails to find a usable network interface
+    # "upnp"
     "uptime"
     "usgs_earthquakes_feed"
     "utility_meter"
@@ -751,7 +727,8 @@ in with py.pkgs; buildPythonApplication rec {
     "vizio"
     "voicerss"
     "volumio"
-    "vultr"
+    # disabled, becaused AttributeError: <class 'vultr.vultr.Vultr'> does not have the attribute 'server_list'
+    # "vultr"
     "wake_on_lan"
     "wallbox"
     "water_heater"
@@ -776,7 +753,8 @@ in with py.pkgs; buildPythonApplication rec {
     "yandex_transport"
     "yandextts"
     "yeelight"
-    "zeroconf"
+    # disabled, because it tries to join a multicast group and fails to find a usable network interface
+    # "zeroconf"
     "zerproc"
     "zha"
     "zodiac"
@@ -826,6 +804,8 @@ in with py.pkgs; buildPythonApplication rec {
     # wallbox/test_config_flow.py: Tries to connect to api.wall-box.cim: Failed to establish a new connection: [Errno -2] Name or service not known
     "--deselect tests/components/wallbox/test_config_flow.py::test_form_invalid_auth"
     "--deselect tests/components/wallbox/test_config_flow.py::test_form_cannot_connect"
+    # tests/components/default_config/test_init.py: Tries to check for updates and fails ungracefully without network access
+    "--deselect tests/components/default_config/test_init.py::test_setup"
     # tests are located in tests/
     "tests"
     # dynamically add packages required for component tests
@@ -861,6 +841,10 @@ in with py.pkgs; buildPythonApplication rec {
     "test_onboarding_core_no_rpi_power"
     # hue/test_sensor_base.py: Race condition when counting events
     "test_hue_events"
+    # homekit/test_homekit.py: Tries to use zeroconf, which tries to join a multicast group
+    "test_homekit_uses_system_zeroconf"
+    # august/test_lock.py: AssertionError: assert 'unlocked' == 'locked'
+    "test_lock_update_via_pubnub"
   ];
 
   preCheck = ''
diff --git a/pkgs/servers/home-assistant/frontend.nix b/pkgs/servers/home-assistant/frontend.nix
index f59f3943cd0..a42b13a260d 100644
--- a/pkgs/servers/home-assistant/frontend.nix
+++ b/pkgs/servers/home-assistant/frontend.nix
@@ -4,11 +4,11 @@ buildPythonPackage rec {
   # the frontend version corresponding to a specific home-assistant version can be found here
   # https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/frontend/manifest.json
   pname = "home-assistant-frontend";
-  version = "20210603.0";
+  version = "20210707.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-2UhbtaxEcOkD9Z5g9gZs+QjuVLXZGCEcmKoxRtIEYxw=";
+    sha256 = "sha256-6RR+T4+vS6g00+MS1ty8aFVx6WM2dE+c17+wDoPxnGg=";
   };
 
   # there is nothing to strip in this package
diff --git a/pkgs/servers/home-assistant/update.sh b/pkgs/servers/home-assistant/update.sh
index 5ed865f411e..8b17dabdfe2 100755
--- a/pkgs/servers/home-assistant/update.sh
+++ b/pkgs/servers/home-assistant/update.sh
@@ -23,10 +23,16 @@ sed -i -e "s/version =.*/version = \"${TARGET_VERSION}\";/" \
 sed -i -e "s/hassVersion =.*/hassVersion = \"${TARGET_VERSION}\";/" \
     default.nix
 
-./parse-requirements.py
 (
+    # update the frontend before running parse-requirements, so it doesn't get shown as outdated
     cd ../../..
     nix-update --version "$FRONTEND_VERSION" home-assistant.python.pkgs.home-assistant-frontend
+)
+
+./parse-requirements.py
+
+(
+    cd ../../..
     nix-update --version "$TARGET_VERSION" --build home-assistant
 )