From c20928c6919a318203fb7dce5dd5e53e10121611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 11 Mar 2026 00:49:29 +0100 Subject: [PATCH] home-assistant-custom-lovelace-modules.horizon-card: init at 1.4.0 --- .../horizon-card/package.nix | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 pkgs/servers/home-assistant/custom-lovelace-modules/horizon-card/package.nix diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/horizon-card/package.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/horizon-card/package.nix new file mode 100644 index 000000000000..15555be3ee4b --- /dev/null +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/horizon-card/package.nix @@ -0,0 +1,53 @@ +{ + lib, + fetchFromGitHub, + stdenvNoCC, + yarn-berry, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "horizon-card"; + version = "1.4.0"; + + src = fetchFromGitHub { + owner = "rejuvenate"; + repo = "lovelace-horizon-card"; + tag = "v${finalAttrs.version}"; + hash = "sha256-z2cJ6BIhNnzUo9nIFxVyrPBVWSKf35fyLXK72pE8TJw="; + }; + + nativeBuildInputs = [ + yarn-berry + yarn-berry.yarnBerryConfigHook + ]; + + offlineCache = yarn-berry.fetchYarnBerryDeps { + inherit (finalAttrs) src; + hash = "sha256-LYPHBnDRcGeXo2btx1A4/e7fr7MYg/2G5GkuG/xDG+I="; + }; + + buildPhase = '' + runHook preBuild + + yarn build + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + install dist/lovelace-horizon-card.js -Dt $out + + runHook postInstall + ''; + + meta = { + description = "Sun Card successor: Visualize the position of the Sun over the horizon"; + homepage = "https://github.com/rejuvenate/lovelace-horizon-card"; + changelog = "https://github.com/rejuvenate/lovelace-horizon-card/releases/tag/${finalAttrs.src.tag}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ SuperSandro2000 ]; + platforms = lib.platforms.all; + }; +})