From e13eb7631e6d7041f4d78cde9ec9b9d14a91f479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 21 Jun 2026 01:07:08 +0200 Subject: [PATCH] home-assistant-custom-lovelace-modules.weather-forecast-card: init at 1.0.0 --- .../weather-forecast-card/package.nix | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 pkgs/servers/home-assistant/custom-lovelace-modules/weather-forecast-card/package.nix diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/weather-forecast-card/package.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/weather-forecast-card/package.nix new file mode 100644 index 000000000000..797d12b749b7 --- /dev/null +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/weather-forecast-card/package.nix @@ -0,0 +1,61 @@ +{ + lib, + fetchFromGitHub, + fetchPnpmDeps, + nodejs, + pnpm, + pnpmConfigHook, + stdenvNoCC, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "weather-forecast-card"; + version = "1.0.0"; + + src = fetchFromGitHub { + owner = "troinine"; + repo = "ha-weather-forecast-card"; + tag = "v${finalAttrs.version}"; + hash = "sha256-N3bE6HSXx6Vst6ZiMsJ490XBnlDQJDm+MoEunlLusnQ="; + }; + + pnpmDeps = fetchPnpmDeps { + inherit (finalAttrs) pname version src; + inherit pnpm; + fetcherVersion = 4; + hash = "sha256-DDJpfkblo3E6YxWThs0rtkMabhRuDW2k5fszTo4Gud8="; + }; + + nativeBuildInputs = [ + pnpmConfigHook + pnpm + nodejs + ]; + + buildPhase = '' + runHook preBuild + + pnpm run build + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + mkdir -p "$out" + cp dist/* "$out" + + runHook postInstall + ''; + + passthru.entrypoint = "weather-forecast-card.js"; + + meta = { + description = "Slightly improved weather forecast card for Home Assistant"; + homepage = "https://github.com/troinine/ha-weather-forecast-card"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ SuperSandro2000 ]; + platforms = lib.platforms.all; + }; +})