Skip to content

Commit

Permalink
Revert "nixos/home-assistant: use override before overridePythonAttrs"
Browse files Browse the repository at this point in the history
  • Loading branch information
mweinelt committed Apr 11, 2021
1 parent 62ce5aa commit 3cb8340
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions nixos/modules/services/misc/home-assistant.nix
Expand Up @@ -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;
Expand Down Expand Up @@ -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 ''
Expand All @@ -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 <literal>extraPackages</literal> or <literal>extraComponents</literal> in order to add additional dependencies.
If you specify <option>config</option> and do not set <option>autoExtraComponents</option>
to <literal>false</literal>, overriding <literal>extraComponents</literal> will have no effect.
Avoid <literal>home-assistant.overridePythonAttrs</literal> if you use
<literal>autoExtraComponents</literal>.
'';
};

Expand Down

0 comments on commit 3cb8340

Please sign in to comment.