From 6b7c9f855d42a1df70e8e5212b3293fda5de5a3a Mon Sep 17 00:00:00 2001 From: arcnmx Date: Thu, 23 Jan 2025 21:50:43 -0800 Subject: [PATCH] fix(hass): pin to python312 for a bit... --- modules/nixos/home-assistant.nix | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/modules/nixos/home-assistant.nix b/modules/nixos/home-assistant.nix index 9c3406ec..4f198549 100644 --- a/modules/nixos/home-assistant.nix +++ b/modules/nixos/home-assistant.nix @@ -214,6 +214,7 @@ in { ]; package = let inherit (cfg.package) python; + needsPython312pin = cfg.grocy.enable && lib.versionAtLeast pkgs.home-assistant.python.version "3.13"; # https://github.com/pysnmp/pysnmp/issues/51 needsPyasn1pin = if lib.versionOlder python.pkgs.pysnmplib.version "6.0" @@ -221,6 +222,7 @@ in { else lib.warn "pyasn1 pin likely no longer needed" false; pyasn1prefix = "${python.pkgs.pysnmp-pyasn1}/${python.sitePackages}"; home-assistant = pkgs.home-assistant.override { + ${if needsPython312pin then "python313" else null} = pkgs.python312; packageOverrides = self: super: { brother = super.brother.overridePythonAttrs (old: { dontCheckRuntimeDeps = @@ -241,13 +243,6 @@ in { "test_idle_timeout" ]); }); - env-canada = super.env-canada.overridePythonAttrs (old: { - dependencies = - old.dependencies - ++ [ - self.defusedxml - ]; - }); }; }; in