From 76b23b87569deff7e3efc984fe884905fd512ae6 Mon Sep 17 00:00:00 2001 From: K900 Date: Sun, 5 May 2024 22:07:26 +0300 Subject: [PATCH] home-assistant-custom-lovelace-modules.lg-webos-remote-control: init at 2.0.3 --- .../custom-lovelace-modules/default.nix | 2 + .../lg-webos-remote-control/default.nix | 37 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 pkgs/servers/home-assistant/custom-lovelace-modules/lg-webos-remote-control/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 0d8e21bb2e7e..54120bbbf917 100644 --- a/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix @@ -10,6 +10,8 @@ decluttering-card = callPackage ./decluttering-card { }; + lg-webos-remote-control = callPackage ./lg-webos-remote-control { }; + light-entity-card = callPackage ./light-entity-card { }; mini-graph-card = callPackage ./mini-graph-card {}; diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/lg-webos-remote-control/default.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/lg-webos-remote-control/default.nix new file mode 100644 index 000000000000..9911fbfdce1a --- /dev/null +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/lg-webos-remote-control/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildNpmPackage +, fetchFromGitHub +}: + +buildNpmPackage rec { + pname = "lg-webos-remote-control"; + version = "2.0.3"; + + src = fetchFromGitHub { + owner = "madmicio"; + repo = "LG-WebOS-Remote-Control"; + rev = version; + hash = "sha256-ICOAi8q8dWrBFCv18JYSWc6MIwqxfDXOcc6kCKLGehs="; + }; + + npmDepsHash = "sha256-kN+i0ic1JWs6kqnAliiO4yVMDXwfZaQsRGKeV9A0MxE="; + + installPhase = '' + runHook preInstall + + mkdir $out + cp dist/lg-remote-control.js $out + + runHook postInstall + ''; + + passthru.entrypoint = "lg-remote-control.js"; + + meta = with lib; { + description = "Remote Control for LG TV WebOS"; + homepage = "https://github.com/madmicio/LG-WebOS-Remote-Control"; + license = licenses.mit; + maintainers = with maintainers; [ k900 ]; + platforms = platforms.all; + }; +}