diff options
Diffstat (limited to 'pkgs/servers/home-assistant')
-rw-r--r-- | pkgs/servers/home-assistant/component-packages.nix | 5 | ||||
-rw-r--r-- | pkgs/servers/home-assistant/custom-components/homematicip_local/default.nix | 4 | ||||
-rw-r--r-- | pkgs/servers/home-assistant/default.nix | 29 | ||||
-rw-r--r-- | pkgs/servers/home-assistant/intents.nix | 54 | ||||
-rw-r--r-- | pkgs/servers/home-assistant/stubs.nix | 4 | ||||
-rwxr-xr-x | pkgs/servers/home-assistant/update-component-packages.py (renamed from pkgs/servers/home-assistant/parse-requirements.py) | 2 | ||||
-rwxr-xr-x | pkgs/servers/home-assistant/update.py | 2 |
7 files changed, 67 insertions, 33 deletions
diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index d8da6b345eb46..186956baa9ff9 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -1,8 +1,8 @@ -# Generated by parse-requirements.py +# Generated by update-component-packages.py # Do not edit! { - version = "2024.4.3"; + version = "2024.4.4"; components = { "3_day_blinds" = ps: with ps; [ ]; @@ -5945,6 +5945,7 @@ "airthings" "airthings_ble" "airtouch4" + "airtouch5" "airvisual" "airvisual_pro" "airzone" diff --git a/pkgs/servers/home-assistant/custom-components/homematicip_local/default.nix b/pkgs/servers/home-assistant/custom-components/homematicip_local/default.nix index 26fed03c92756..f6dcd994719b4 100644 --- a/pkgs/servers/home-assistant/custom-components/homematicip_local/default.nix +++ b/pkgs/servers/home-assistant/custom-components/homematicip_local/default.nix @@ -7,13 +7,13 @@ buildHomeAssistantComponent rec { owner = "danielperna84"; domain = "homematicip_local"; - version = "1.59.0"; + version = "1.60.1"; src = fetchFromGitHub { owner = "danielperna84"; repo = "custom_homematic"; rev = "refs/tags/${version}"; - hash = "sha256-fVOx/ONE+XXluXrImZWoD630EK/FOLb/Ft/L7t2Ua8o="; + hash = "sha256-EJj9zmDdJ+T7yrANmRJuLRCSwvGLy2CkIBsO9H3LIs4="; }; dependencies = [ diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index e3bec47d25a80..52bf366e74fff 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -388,6 +388,13 @@ let rev = "refs/tags/${version}"; hash = "sha256-vi5f4V0nPb9K3nwdmwMDoNE85Or6haOWjMY4d/2Fj2s="; }; + dependencies = with self; [ + aiohttp + async-timeout + gql + python-dateutil + websockets + ]; }); pykaleidescape = super.pykaleidescape.overridePythonAttrs (oldAttrs: rec { @@ -439,17 +446,9 @@ let }; }); - versioningit = super.versioningit.overridePythonAttrs (oldAttrs: rec { - version = "2.2.0"; - src = fetchPypi { - inherit (oldAttrs) pname; - inherit version; - hash = "sha256-6xjnunJoqIC/HM/pLlNOlqs04Dl/KNy8s/wNpPaltr0="; - }; - pytestFlagsArray = [ - "-W" "ignore::DeprecationWarning" - ]; - }); + versioningit = super.versioningit.overridePythonAttrs { + doCheck = false; + }; voluptuous = super.voluptuous.overridePythonAttrs (oldAttrs: rec { version = "0.13.1"; @@ -525,8 +524,8 @@ let # Ensure that we are using a consistent package set extraBuildInputs = extraPackages python.pkgs; - # Don't forget to run parse-requirements.py after updating - hassVersion = "2024.4.3"; + # Don't forget to run update-component-packages.py after updating + hassVersion = "2024.4.4"; in python.pkgs.buildPythonApplication rec { pname = "homeassistant"; @@ -544,13 +543,13 @@ in python.pkgs.buildPythonApplication rec { owner = "home-assistant"; repo = "core"; rev = "refs/tags/${version}"; - hash = "sha256-jHt4cWi1JxUs2XKf0N9gqsYj5XZK7TXwgj7WPZ7dmEA="; + hash = "sha256-bZcrFtaO0S22M6Wt2otK8rCg+NhpXr+/yRFxi02QJJI="; }; # Secondary source is pypi sdist for translations sdist = fetchPypi { inherit pname version; - hash = "sha256-sj3usdXUl/wNElO3OgGx6dsBqn9+h9zq/AC3Zdn379M="; + hash = "sha256-NyIBFpDstX1MEoLS9p7GXl/+V6xB2hklNf2LmNLUMQk="; }; nativeBuildInputs = with python.pkgs; [ diff --git a/pkgs/servers/home-assistant/intents.nix b/pkgs/servers/home-assistant/intents.nix index b7b1578033e25..744adc8b49739 100644 --- a/pkgs/servers/home-assistant/intents.nix +++ b/pkgs/servers/home-assistant/intents.nix @@ -1,33 +1,67 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , pythonOlder # build-system , setuptools + +# codegen +, hassil +, python +, pyyaml +, voluptuous +, regex +, jinja2 + +# tests +, pytest-xdist +, pytestCheckHook }: buildPythonPackage rec { pname = "home-assistant-intents"; version = "2024.4.3"; - format = "wheel"; + pyproject = true; disabled = pythonOlder "3.9"; - src = fetchPypi { - inherit version format; - pname = "home_assistant_intents"; - dist = "py3"; - python = "py3"; - hash = "sha256-GraYVtioKIoKlPRBhhhzlbBfI6heXAaA1MQpUqAgEDQ="; + src = fetchFromGitHub { + owner = "home-assistant"; + repo = "intents-package"; + rev = "refs/tags/${version}"; + hash = "sha256-hcstD1qkngZAl/jKLez+4qDs/ZIandkVkY2jrvZqph8="; + fetchSubmodules = true; }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "setuptools~=62.3" "setuptools" \ + --replace-fail "wheel~=0.37.1" "wheel" + ''; + build-system = [ setuptools + + # build-time codegen; https://github.com/home-assistant/intents/blob/main/requirements.txt#L1-L5 + hassil + pyyaml + voluptuous + regex + jinja2 ]; - # sdist/wheel do not ship tests - doCheck = false; + postInstall = '' + # https://github.com/home-assistant/intents-package/blob/main/script/package#L23-L24 + PACKAGE_DIR=$out/${python.sitePackages}/home_assistant_intents + ${python.pythonOnBuildForHost.interpreter} script/merged_output.py $PACKAGE_DIR/data + ${python.pythonOnBuildForHost.interpreter} script/write_languages.py $PACKAGE_DIR/data > $PACKAGE_DIR/languages.py + ''; + + nativeCheckInputs = [ + pytest-xdist + pytestCheckHook + ]; pytestFlagsArray = [ "intents/tests" diff --git a/pkgs/servers/home-assistant/stubs.nix b/pkgs/servers/home-assistant/stubs.nix index f8e4e49b13ff0..d31cf8104dbed 100644 --- a/pkgs/servers/home-assistant/stubs.nix +++ b/pkgs/servers/home-assistant/stubs.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "homeassistant-stubs"; - version = "2024.4.3"; + version = "2024.4.4"; format = "pyproject"; disabled = python.version != home-assistant.python.version; @@ -17,7 +17,7 @@ buildPythonPackage rec { owner = "KapJI"; repo = "homeassistant-stubs"; rev = "refs/tags/${version}"; - hash = "sha256-uFQQNcRfo4m3GnfCbAe4yjdphkpqnhpqVr1EZP3bqVM="; + hash = "sha256-BPmHorcyO6a7Ag7FQogkZYh2x3GoMRKiFh+9aSkjE7M="; }; nativeBuildInputs = [ diff --git a/pkgs/servers/home-assistant/parse-requirements.py b/pkgs/servers/home-assistant/update-component-packages.py index 404120d062acb..10288f5e6d64f 100755 --- a/pkgs/servers/home-assistant/parse-requirements.py +++ b/pkgs/servers/home-assistant/update-component-packages.py @@ -268,7 +268,7 @@ def main() -> None: build_inputs[component] = (attr_paths, extra_attrs, missing_reqs) with open(os.path.dirname(sys.argv[0]) + "/component-packages.nix", "w") as f: - f.write("# Generated by parse-requirements.py\n") + f.write("# Generated by update-component-packages.py\n") f.write("# Do not edit!\n\n") f.write("{\n") f.write(f' version = "{version}";\n') diff --git a/pkgs/servers/home-assistant/update.py b/pkgs/servers/home-assistant/update.py index c9b9eb183890e..70eb77ce9a1cd 100755 --- a/pkgs/servers/home-assistant/update.py +++ b/pkgs/servers/home-assistant/update.py @@ -222,7 +222,7 @@ class HomeAssistant: async def update_components(self): await run_async([ - f"{ROOT}/pkgs/servers/home-assistant/parse-requirements.py" + f"{ROOT}/pkgs/servers/home-assistant/update-component-packages.py" ]) |