Merge pull request #330152 from dotlambda/home-assistant

nixos/home-assistant: customComponents must use buildHomeAssistantComponent
This commit is contained in:
Martin Weinelt 2024-07-26 19:15:11 +02:00 committed by GitHub
commit 0196cfe7f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 2 deletions

View File

@ -192,7 +192,12 @@ in {
};
customComponents = mkOption {
type = types.listOf types.package;
type = types.listOf (
types.addCheck types.package (p: p.isHomeAssistantComponent or false) // {
name = "home-assistant-component";
description = "package that is a Home Assistant component";
}
);
default = [];
example = literalExpression ''
with pkgs.home-assistant-custom-components; [

View File

@ -39,5 +39,9 @@ home-assistant.python.pkgs.buildPythonPackage (
packaging
] ++ (args.nativeCheckInputs or []);
} // builtins.removeAttrs args [ "nativeCheckInputs" ]
passthru = {
isHomeAssistantComponent = true;
} // args.passthru or { };
} // builtins.removeAttrs args [ "nativeCheckInputs" "passthru" ]
)