about summary refs log tree commit diff
path: root/pkgs/servers/home-assistant/custom-lovelace-modules/android-tv-card/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/home-assistant/custom-lovelace-modules/android-tv-card/default.nix')
-rw-r--r--pkgs/servers/home-assistant/custom-lovelace-modules/android-tv-card/default.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/android-tv-card/default.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/android-tv-card/default.nix
new file mode 100644
index 0000000000000..bf98c9a9438ae
--- /dev/null
+++ b/pkgs/servers/home-assistant/custom-lovelace-modules/android-tv-card/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, buildNpmPackage
+, fetchFromGitHub
+}:
+
+buildNpmPackage rec {
+  pname = "android-tv-card";
+  version = "3.7.4";
+
+  src = fetchFromGitHub {
+    owner = "Nerwyn";
+    repo = "android-tv-card";
+    rev = version;
+    hash = "sha256-5GdN6zCE24kGLM4ka8vHdpIEWTQAzve/1l3+5OV95i0=";
+  };
+
+  patches = [ ./dont-call-git.patch ];
+
+  npmDepsHash = "sha256-fVnqGe/ao0Ilk/mWbHGscYQlIIk3K0mpm1wS4F8Lio4=";
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir $out
+    cp dist/android-tv-card.min.js $out
+
+    runHook postInstall
+  '';
+
+  passthru.entrypoint = "android-tv-card.min.js";
+
+  meta = with lib; {
+    description = "Universal Customizable TV Remote Card, with HA actions, super configurable touchpad, slider, haptics, and keyboard";
+    homepage = "https://github.com/Nerwyn/android-tv-card";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ k900 ];
+    platforms = platforms.all;
+  };
+}