From 694250266280ff96201eba678c6c6977355d8cb8 Mon Sep 17 00:00:00 2001 From: Zhong Jianxin Date: Mon, 11 Nov 2024 18:28:42 +0800 Subject: [PATCH] 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 --- .../home-assistant/build-custom-component/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/build-custom-component/default.nix b/pkgs/servers/home-assistant/build-custom-component/default.nix index 7f45ac6bcb00..dc2663e8f724 100644 --- a/pkgs/servers/home-assistant/build-custom-component/default.nix +++ b/pkgs/servers/home-assistant/build-custom-component/default.nix @@ -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" ] )