buildHomeAssistantComponent: inherit meta.platforms from home-assistant

home-assistant-custom-components.* are meant to be used with home-assistant,
they should be built for the same platforms as home-assistant.

Currently home-assistant is [Linux only][1], this will prevent
home-assistant-custom-component.* from building on Darwin, and save some build resources.

[1]: 87a30cbaa0/pkgs/servers/home-assistant/default.nix (L675)
This commit is contained in:
Zhong Jianxin 2024-11-11 18:28:42 +08:00
parent dc460ec76c
commit 6942502662

View File

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