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]: https://github.com/NixOS/nixpkgs/blob/87a30cbaa07aea689bf90c93cfc69da7f2dcb0df/pkgs/servers/home-assistant/default.nix#L675
This commit is contained in:
Zhong Jianxin
2024-11-11 20:54:06 +08:00
parent dc460ec76c
commit 6942502662
@@ -43,5 +43,9 @@ home-assistant.python.pkgs.buildPythonPackage (
isHomeAssistantComponent = true;
} // args.passthru or { };
} // builtins.removeAttrs args [ "nativeCheckInputs" "passthru" ]
meta = {
inherit (home-assistant.meta) platforms;
} // args.meta or { };
} // builtins.removeAttrs args [ "meta" "nativeCheckInputs" "passthru" ]
)