diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 307aa6e637558..2fc71db7110e2 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -49,6 +49,7 @@ let }; postPatch = '' substituteInPlace pyproject.toml \ + --replace "poetry>=1.0.0b1" "poetry-core" \ --replace "poetry.masonry" "poetry.core.masonry" ''; propagatedBuildInputs = oldAttrs.propagatedBuildInputs ++ [ @@ -324,6 +325,7 @@ in python.pkgs.buildPythonApplication rec { nativeBuildInputs = with python.pkgs; [ setuptools + wheel ]; # copy tests early, so patches apply as they would to the git repo @@ -368,6 +370,9 @@ in python.pkgs.buildPythonApplication rec { ) relaxedConstraints)} pyproject.toml substituteInPlace tests/test_config.py --replace '"/usr"' '"/build/media"' + + sed -i 's/setuptools[~=]/setuptools>/' pyproject.toml + sed -i 's/wheel[~=]/wheel>/' pyproject.toml ''; propagatedBuildInputs = with python.pkgs; [ diff --git a/pkgs/servers/home-assistant/intents.nix b/pkgs/servers/home-assistant/intents.nix index 0255d97da6b6e..a93fc2a3523d0 100644 --- a/pkgs/servers/home-assistant/intents.nix +++ b/pkgs/servers/home-assistant/intents.nix @@ -1,8 +1,10 @@ { lib , buildPythonPackage , fetchFromGitHub +, fetchpatch , pythonOlder , setuptools +, wheel # build , hassil @@ -32,6 +34,15 @@ buildPythonPackage rec { fetchSubmodules = true; }; + patches = [ + # https://github.com/home-assistant/intents-package/pull/1 + (fetchpatch { + name = "unpin-setuptools-dependency.patch"; + url = "https://github.com/home-assistant/intents-package/commit/fc03c1ec1001ba3b812f2eea670d1c447cf2acee.patch"; + hash = "sha256-kTu1+IwDrcdqelyK/vfhxw8MQBis5I1jag7YTytKQhs="; + }) + ]; + nativeBuildInputs = [ hassil jinja2 @@ -39,6 +50,7 @@ buildPythonPackage rec { regex setuptools voluptuous + wheel ]; postInstall = ''