From 015328399ec733874282b9bc8855bca7db650e73 Mon Sep 17 00:00:00 2001 From: Golbinex <2061409-Golbinex@users.noreply.gitlab.com> Date: Mon, 18 Nov 2024 21:00:39 +0100 Subject: [PATCH] home-assistant-custom-lovelace-modules.vacuum-card: init at 2.10.1 --- .../custom-lovelace-modules/default.nix | 2 + .../vacuum-card/default.nix | 38 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100755 pkgs/servers/home-assistant/custom-lovelace-modules/vacuum-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 f71bf6271f85..96e1eca0692f 100644 --- a/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix @@ -39,6 +39,8 @@ universal-remote-card = callPackage ./universal-remote-card { }; + vacuum-card = callPackage ./vacuum-card { }; + valetudo-map-card = callPackage ./valetudo-map-card { }; weather-card = callPackage ./weather-card { }; diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/vacuum-card/default.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/vacuum-card/default.nix new file mode 100755 index 000000000000..7caf03b226a0 --- /dev/null +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/vacuum-card/default.nix @@ -0,0 +1,38 @@ +{ + lib, + buildNpmPackage, + fetchFromGitHub, +}: + +buildNpmPackage rec { + pname = "vacuum-card"; + version = "2.10.1"; + + src = fetchFromGitHub { + owner = "denysdovhan"; + repo = "vacuum-card"; + rev = "v${version}"; + hash = "sha256-NJeD6YhXmNNBuhRWjK74sTrxzXyGSbehm5lz05sNA3Y="; + }; + + npmDepsHash = "sha256-x+pq58chBSgFVGr9Xtka5/MH/AHV0zMpyKfA/kEEXBM="; + + installPhase = '' + runHook preInstall + + mkdir $out + cp dist/vacuum-card.js $out + + runHook postInstall + ''; + + passthru.entrypoint = "vacuum-card.js"; + + meta = with lib; { + description = "Vacuum cleaner card for Home Assistant Lovelace UI"; + homepage = "https://github.com/denysdovhan/vacuum-card"; + license = licenses.mit; + maintainers = with maintainers; [ baksa ]; + platforms = platforms.all; + }; +}