From 3cb83409d2e88e86d51e57fc5213b3c2d32723f1 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 12 Apr 2021 00:00:57 +0200 Subject: [PATCH] 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 2787c975b352..f6398c083979 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. ''; };