From 3cb83409d2e88e86d51e57fc5213b3c2d32723f1 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 12 Apr 2021 00:00:57 +0200 Subject: [PATCH 1/3] Revert "nixos/home-assistant: use override before overridePythonAttrs" --- .../modules/services/misc/home-assistant.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/nixos/modules/services/misc/home-assistant.nix b/nixos/modules/services/misc/home-assistant.nix index 2787c975b35..f6398c08397 100644 --- a/nixos/modules/services/misc/home-assistant.nix +++ b/nixos/modules/services/misc/home-assistant.nix @@ -50,15 +50,10 @@ let # List of components used in config extraComponents = filter useComponent availableComponents; - testedPackage = if (cfg.autoExtraComponents && cfg.config != null) + package = if (cfg.autoExtraComponents && cfg.config != null) then (cfg.package.override { inherit extraComponents; }) else cfg.package; - # overridePythonAttrs has to be applied after override - package = testedPackage.overridePythonAttrs (oldAttrs: { - doCheck = false; - }); - # If you are changing this, please update the description in applyDefaultConfig defaultConfig = { homeassistant.time_zone = config.time.timeZone; @@ -188,9 +183,13 @@ in { }; package = mkOption { - default = pkgs.home-assistant; + default = pkgs.home-assistant.overridePythonAttrs (oldAttrs: { + doCheck = false; + }); defaultText = literalExample '' - pkgs.home-assistant + pkgs.home-assistant.overridePythonAttrs (oldAttrs: { + doCheck = false; + }) ''; type = types.package; example = literalExample '' @@ -199,12 +198,10 @@ in { } ''; description = '' - Home Assistant package to use. Tests are automatically disabled, as they take a considerable amout of time to complete. + Home Assistant package to use. By default the tests are disabled, as they take a considerable amout of time to complete. Override extraPackages or extraComponents in order to add additional dependencies. If you specify and do not set to false, overriding extraComponents will have no effect. - Avoid home-assistant.overridePythonAttrs if you use - autoExtraComponents. ''; }; From 485034873f6d8bc8b86cb768c7144a9f9e789724 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 13 Apr 2021 22:46:36 +0200 Subject: [PATCH 2/3] Revert "nixos/home-assistant: use overridePythonAttrs" This reverts commit f9bd8b1b7bda019a823e93a0ecb719e15ac620cb. --- nixos/modules/services/misc/home-assistant.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nixos/modules/services/misc/home-assistant.nix b/nixos/modules/services/misc/home-assistant.nix index f6398c08397..5cfadf81b97 100644 --- a/nixos/modules/services/misc/home-assistant.nix +++ b/nixos/modules/services/misc/home-assistant.nix @@ -183,12 +183,12 @@ in { }; package = mkOption { - default = pkgs.home-assistant.overridePythonAttrs (oldAttrs: { - doCheck = false; + default = pkgs.home-assistant.overrideAttrs (oldAttrs: { + doInstallCheck = false; }); defaultText = literalExample '' - pkgs.home-assistant.overridePythonAttrs (oldAttrs: { - doCheck = false; + pkgs.home-assistant.overrideAttrs (oldAttrs: { + doInstallCheck = false; }) ''; type = types.package; From 1d9f619311e9fa28a63ce0b65ae93a9273709114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 17 Apr 2021 02:20:07 +0200 Subject: [PATCH 3/3] nixos/home-assistant: warn about `overridePythonAttrs` in package option --- nixos/modules/services/misc/home-assistant.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/misc/home-assistant.nix b/nixos/modules/services/misc/home-assistant.nix index 5cfadf81b97..0590f54ae60 100644 --- a/nixos/modules/services/misc/home-assistant.nix +++ b/nixos/modules/services/misc/home-assistant.nix @@ -202,6 +202,7 @@ in { Override extraPackages or extraComponents in order to add additional dependencies. If you specify and do not set to false, overriding extraComponents will have no effect. + Avoid home-assistant.overridePythonAttrs if you use autoExtraComponents. ''; };