nixos/home-assistant: use override before overridePythonAttrs
This commit is contained in:
parent
e289a280f3
commit
5e0defcb25
|
@ -50,10 +50,15 @@ let
|
||||||
# List of components used in config
|
# List of components used in config
|
||||||
extraComponents = filter useComponent availableComponents;
|
extraComponents = filter useComponent availableComponents;
|
||||||
|
|
||||||
package = if (cfg.autoExtraComponents && cfg.config != null)
|
testedPackage = if (cfg.autoExtraComponents && cfg.config != null)
|
||||||
then (cfg.package.override { inherit extraComponents; })
|
then (cfg.package.override { inherit extraComponents; })
|
||||||
else cfg.package;
|
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
|
# If you are changing this, please update the description in applyDefaultConfig
|
||||||
defaultConfig = {
|
defaultConfig = {
|
||||||
homeassistant.time_zone = config.time.timeZone;
|
homeassistant.time_zone = config.time.timeZone;
|
||||||
|
@ -183,13 +188,9 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
default = pkgs.home-assistant.overridePythonAttrs (oldAttrs: {
|
default = pkgs.home-assistant;
|
||||||
doCheck = false;
|
|
||||||
});
|
|
||||||
defaultText = literalExample ''
|
defaultText = literalExample ''
|
||||||
pkgs.home-assistant.overridePythonAttrs (oldAttrs: {
|
pkgs.home-assistant
|
||||||
doCheck = false;
|
|
||||||
})
|
|
||||||
'';
|
'';
|
||||||
type = types.package;
|
type = types.package;
|
||||||
example = literalExample ''
|
example = literalExample ''
|
||||||
|
@ -198,10 +199,12 @@ in {
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
Home Assistant package to use. By default the tests are disabled, as they take a considerable amout of time to complete.
|
Home Assistant package to use. Tests are automatically 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.
|
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>
|
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.
|
to <literal>false</literal>, overriding <literal>extraComponents</literal> will have no effect.
|
||||||
|
Avoid <literal>home-assistant.overridePythonAttrs</literal> if you use
|
||||||
|
<literal>autoExtraComponents</literal>.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue