From 86fff9e3bf8f07f563468853c55e02a672ad43dd Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 12 Dec 2024 02:31:59 +0100 Subject: [PATCH] buildHomeAssistantComponent: make build quieter - We generally don't need a buildPhase - Copy custom_sentences only if they exist --- .../home-assistant/build-custom-component/default.nix | 8 +++++++- 1 file changed, 7 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 b951b076b75f..02f1d01a1170 100644 --- a/pkgs/servers/home-assistant/build-custom-component/default.nix +++ b/pkgs/servers/home-assistant/build-custom-component/default.nix @@ -22,6 +22,10 @@ home-assistant.python.pkgs.buildPythonPackage ( pname = "${owner}/${domain}"; inherit version format; + buildPhase = '' + true + ''; + installPhase = '' runHook preInstall @@ -34,7 +38,9 @@ home-assistant.python.pkgs.buildPythonPackage ( fi # optionally copy sentences, if they exist - cp -r ./custom_sentences/ $out/ || true + if [[ -d ./custom_sentences ]]; then + cp -r ./custom_sentences/ $out/ + fi runHook postInstall '';