From 4913d1753f493450df07f2cc954c041c0d7b8c5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 2 Dec 2023 20:29:42 +0100 Subject: [PATCH] home-assistant-custom-lovelace-modules.light-entity-card: init at 6.1.0 --- .../custom-lovelace-modules/default.nix | 2 + .../light-entity-card/default.nix | 39 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 pkgs/servers/home-assistant/custom-lovelace-modules/light-entity-card/default.nix diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix index 4bb1e63b5f7f..848e6062451a 100644 --- a/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix @@ -2,6 +2,8 @@ }: { + light-entity-card = callPackage ./light-entity-card { }; + mini-graph-card = callPackage ./mini-graph-card {}; mini-media-player = callPackage ./mini-media-player {}; diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/light-entity-card/default.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/light-entity-card/default.nix new file mode 100644 index 000000000000..0cdf9ee1677e --- /dev/null +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/light-entity-card/default.nix @@ -0,0 +1,39 @@ +{ lib +, buildNpmPackage +, fetchFromGitHub +}: + +buildNpmPackage rec { + pname = "light-entity-card"; + version = "6.1.0"; + + src = fetchFromGitHub { + owner = "ljmerza"; + repo = "light-entity-card"; + rev = "refs/tags/${version}"; + hash = "sha256-CJpRvgPf7+v9m/8/O2R+nut3PnyDPC8OTipyE+Brp9U="; + }; + + npmDepsHash = "sha256-EZDTWtn3joikwiC5Kfn94+tXRDpBhMDHqHozfIkfbJ0="; + + env.NODE_OPTIONS = "--openssl-legacy-provider"; + + installPhase = '' + runHook preInstall + + mkdir $out + cp -v dist/light-entity-card.js* $out/ + + runHook postInstall + ''; + + passthru.entrypoint = "light-entity-card"; + + meta = with lib; { + description = "Control any light or switch entity"; + homepage = "https://github.com/ljmerza/light-entity-card"; + changelog = "https://github.com/ljmerza/light-entity-card/releases/tag/${version}"; + maintainers = with maintainers; [ SuperSandro2000 ]; + license = licenses.mit; + }; +}