about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/multiple-entity-row/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/multiple-entity-row/default.nix')
-rw-r--r--nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/multiple-entity-row/default.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/multiple-entity-row/default.nix b/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/multiple-entity-row/default.nix
new file mode 100644
index 000000000000..0ba1bcec0cc6
--- /dev/null
+++ b/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/multiple-entity-row/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, mkYarnPackage
+, fetchFromGitHub
+, fetchYarnDeps
+}:
+
+mkYarnPackage rec {
+  pname = "multiple-entity-row";
+  version = "4.5.1";
+
+  src = fetchFromGitHub {
+    owner = "benct";
+    repo = "lovelace-multiple-entity-row";
+    rev = "v${version}";
+    hash = "sha256-CXRgXyH1NUg7ssQhenqP0tXr1m2qOkHna3Rf30K3SjI=";
+  };
+
+  packageJSON = ./package.json;
+
+  offlineCache = fetchYarnDeps {
+    yarnLock = "${src}/yarn.lock";
+    hash = "sha256-8YIcQhbYf0e2xO620zVHEk/0sssBmzF/jCq+2za+D6E=";
+  };
+
+  buildPhase = ''
+    runHook preBuild
+
+    yarn --offline build
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir $out
+    install -m0644 ./deps/multiple-entity-row/multiple-entity-row.js $out
+
+    runHook postInstall
+  '';
+
+  doDist = false;
+
+  meta = with lib; {
+    description = "Show multiple entity states and attributes on entity rows in Home Assistant's Lovelace UI";
+    homepage = "https://github.com/benct/lovelace-multiple-entity-row";
+    changelog = "https://github.com/benct/lovelace-multiple-entity-row/blob/${src.rev}/CHANGELOG.md";
+    license = licenses.mit;
+    maintainers = with maintainers; [ hexa ];
+  };
+}