diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/home-assistant/default.nix')
-rw-r--r-- | nixpkgs/pkgs/servers/home-assistant/default.nix | 168 |
1 files changed, 140 insertions, 28 deletions
diff --git a/nixpkgs/pkgs/servers/home-assistant/default.nix b/nixpkgs/pkgs/servers/home-assistant/default.nix index 62abc5de309a..bdd5ff488430 100644 --- a/nixpkgs/pkgs/servers/home-assistant/default.nix +++ b/nixpkgs/pkgs/servers/home-assistant/default.nix @@ -3,6 +3,7 @@ , callPackage , fetchFromGitHub , fetchPypi +, fetchpatch , python311 , substituteAll , ffmpeg-headless @@ -30,16 +31,61 @@ let # Override the version of some packages pinned in Home Assistant's setup.py and requirements_all.txt (self: super: { - # https://github.com/home-assistant/core/pull/101913 - aiohttp = super.aiohttp.overridePythonAttrs (old: rec { - version = "3.9.1"; - src = fetchPypi { - inherit (old) pname; - inherit version; - hash = "sha256-j8Sah6wmnUUp2kWHHi/7aHTod3nD0OLM2BPAiZIhI50="; + aiogithubapi = super.aiogithubapi.overridePythonAttrs (oldAttrs: rec { + version = "22.10.1"; + src = fetchFromGitHub { + owner = "ludeeus"; + repo = "aiogithubapi"; + rev = "refs/tags/${version}"; + hash = "sha256-ceBuqaMqqL6qwN52765MG4sLt+08hx2G9rUVNC7x6ik="; + }; + propagatedBuildInputs = with self; [ + aiohttp + async-timeout + backoff + ]; + }); + + aionotion = super.aionotion.overridePythonAttrs (oldAttrs: rec { + version = "2023.05.5"; + src = fetchFromGitHub { + owner = "bachya"; + repo = "aionotion"; + rev = "refs/tags/${version}"; + hash = "sha256-/2sF8m5R8YXkP89bi5zR3h13r5LrFOl1OsixAcX0D4o="; + }; + patches = [ + (fetchpatch { + # clean up build dependencies; https://github.com/bachya/aionotion/commit/53c7285110d12810f9b43284295f71d052a81b83 + url = "https://github.com/bachya/aionotion/commit/53c7285110d12810f9b43284295f71d052a81b83.patch"; + hash = "sha256-RLRbHmaR2A8MNc96WHx0L8ccyygoBUaOulAuRJkFuUM="; + }) + ]; + }); + + aiopurpleair = super.aiopurpleair.overridePythonAttrs (oldAttrs: rec { + version = "2022.12.1"; + src = fetchFromGitHub { + owner = "bachya"; + repo = "aiopurpleair"; + rev = "refs/tags/${version}"; + hash = "sha256-YmJH4brWkTpgzyHwu9UnIWrY5qlDCmMtvF+KxQFXwfk="; + }; + postPatch = '' + substituteInPlace pyproject.toml --replace \ + '"setuptools >= 35.0.2", "wheel >= 0.29.0", "poetry>=0.12"' \ + '"poetry-core"' + ''; + }); + + aiopvapi = super.aiopvapi.overridePythonAttrs (oldAttrs: rec { + version = "2.0.4"; + src = fetchFromGitHub { + owner = "sander76"; + repo = "aio-powerview-api"; + rev = "refs/tags/v${version}"; + hash = "sha256-cghfNi5T343/7GxNLDrE0iAewMlRMycQTP7SvDVpU2M="; }; - patches = []; - doCheck = false; }); aioskybell = super.aioskybell.overridePythonAttrs (oldAttrs: rec { @@ -60,14 +106,19 @@ let rev = "refs/tags/${version}"; hash = "sha256-tWnxGLJT+CRFvkhxFamHxnLXBvoR8tfOvzH1o1i5JJg="; }; + postPatch = '' + substituteInPlace pyproject.toml --replace \ + '"setuptools >= 35.0.2", "wheel >= 0.29.0", "poetry>=0.12"' \ + '"poetry-core"' + ''; }); - aioresponses = super.aioresponses.overridePythonAttrs (oldAttrs: rec { - pname = "aioresponses"; - version = "0.7.6"; + amberelectric = super.amberelectric.overridePythonAttrs (oldAttrs: rec { + version = "1.0.4"; src = fetchPypi { - inherit pname version; - hash = "sha256-95XZ29otYXdIQOfjL1Nm9FdS0a3Bt0yTYq/QFylsfuE="; + inherit (oldAttrs) pname; + inherit version; + hash = "sha256-5SWJnTxRm6mzP0RxrgA+jnV+Gp23WjqQA57wbT2V9Dk="; }; }); @@ -123,6 +174,7 @@ let aenum aiohttp pydantic + requests ]; doCheck = false; # requires asynctest, which does not work on python 3.11 }); @@ -219,6 +271,18 @@ let }; }); + pyaussiebb = super.pyaussiebb.overridePythonAttrs (oldAttrs: rec { + version = "0.0.18"; + src = fetchFromGitHub { + owner = "yaleman"; + repo = "aussiebb"; + rev = "refs/tags/v${version}"; + hash = "sha256-tEdddVsLFCHRvyLCctDakioiop2xWaJlfGE16P1ukHc="; + }; + }); + + pydantic = super.pydantic_1; + pydexcom = super.pydexcom.overridePythonAttrs (oldAttrs: rec { version = "0.2.3"; src = fetchFromGitHub { @@ -287,6 +351,35 @@ let }; }); + tesla-powerwall = super.tesla-powerwall.overridePythonAttrs (oldAttrs: rec { + version = "0.3.19"; + src = fetchFromGitHub { + owner = "jrester"; + repo = "tesla_powerwall"; + rev = "refs/tags/v${version}"; + hash = "sha256-ClrMgPAMBtDMfD6hCJIN1u4mp75QW+c3re28v3FreQg="; + }; + }); + + versioningit = super.versioningit.overridePythonAttrs (oldAttrs: rec { + version = "2.2.0"; + src = fetchPypi { + inherit (oldAttrs) pname; + inherit version; + hash = "sha256-6xjnunJoqIC/HM/pLlNOlqs04Dl/KNy8s/wNpPaltr0="; + }; + }); + + voluptuous = super.voluptuous.overridePythonAttrs (oldAttrs: rec { + version = "0.13.1"; + src = fetchFromGitHub { + owner = "alecthomas"; + repo = "voluptuous"; + rev = "refs/tags/${version}"; + hash = "sha256-cz3Bd+/yPh+VOHxzi/W+gbDh/H5Nl/n4jvxDOirmAVk="; + }; + }); + # Pinned due to API changes ~1.0 vultr = super.vultr.overridePythonAttrs (oldAttrs: rec { version = "0.1.2"; @@ -298,6 +391,29 @@ let }; }); + xbox-webapi = super.xbox-webapi.overridePythonAttrs (oldAttrs: rec { + version = "2.0.11"; + src = fetchFromGitHub { + owner = "OpenXbox"; + repo = "xbox-webapi-python"; + rev = "refs/tags/v${version}"; + hash = "sha256-fzMB+I8+ZTJUiZovcuj+d5GdHY9BJyJd6j92EhJeIFI="; + }; + postPatch = '' + sed -i '/pytest-runner/d' setup.py + ''; + propagatedBuildInputs = with self; [ + aiohttp + appdirs + ms-cv + pydantic + ecdsa + ]; + nativeCheckInputs = with self; [ + aresponses + ]; + }); + # internal python packages only consumed by home-assistant itself home-assistant-frontend = self.callPackage ./frontend.nix { }; home-assistant-intents = self.callPackage ./intents.nix { }; @@ -322,7 +438,7 @@ let extraBuildInputs = extraPackages python.pkgs; # Don't forget to run parse-requirements.py after updating - hassVersion = "2024.1.2"; + hassVersion = "2024.1.3"; in python.pkgs.buildPythonApplication rec { pname = "homeassistant"; @@ -340,39 +456,32 @@ in python.pkgs.buildPythonApplication rec { owner = "home-assistant"; repo = "core"; rev = "refs/tags/${version}"; - hash = "sha256-FlGSVYgKDw0x4l1z1qe+cUAuzFH0XrE2o7LC2ByY5Bo="; + hash = "sha256-Yrv7THolGNylSK1BKUvEzxL8uAQWkOBOWAX00fJBAuQ="; }; # Secondary source is pypi sdist for translations sdist = fetchPypi { inherit pname version; - hash = "sha256-ijs9RNx17JI0nSHCBB3ysgrM4OdOtcH/96O9DcrTtFQ="; + hash = "sha256-Mj00aTkummsPpUtQ5iUG9xOJ4ra6Sfu8uklwroMXoy0="; }; nativeBuildInputs = with python.pkgs; [ pythonRelaxDepsHook setuptools - wheel ]; pythonRelaxDeps = [ - "aiohttp" - "attrs" "awesomeversion" - "bcrypt" "ciso8601" "cryptography" "home-assistant-bluetooth" "httpx" - "ifaddr" + "lru-dict" "orjson" - "pip" - "PyJWT" - "pyOpenSSL" - "PyYAML" - "requests" + "pyopenssl" "typing-extensions" - "voluptuous-serialize" + "urllib3" + "voluptuous" "yarl" ]; @@ -403,6 +512,9 @@ in python.pkgs.buildPythonApplication rec { propagatedBuildInputs = with python.pkgs; [ # Only packages required in pyproject.toml aiohttp + aiohttp-cors + aiohttp-fast-url-dispatcher + aiohttp-zlib-ng astral async-timeout atomicwrites-homeassistant |