diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-01-31 01:24:55 +0100 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2023-11-10 22:00:30 +0100 |
commit | e4f3fd5b0eb48d121bdf3c8db655a3df8053c4a0 (patch) | |
tree | eb54fea0e354602f13f154a642fd0cebe1e5c0fc /pkgs/servers/home-assistant | |
parent | 9a941c58e5187ae90381c311637be798200ab221 (diff) |
home-assistant-custom-lovelace-modules.mini-graph-card: init at 0.11.0
Minimalistic graph card for Home Assistant Lovelace UI https://github.com/kalkih/mini-graph-card
Diffstat (limited to 'pkgs/servers/home-assistant')
-rw-r--r-- | pkgs/servers/home-assistant/custom-lovelace-modules/default.nix | 1 | ||||
-rw-r--r-- | pkgs/servers/home-assistant/custom-lovelace-modules/mini-graph-card/default.nix | 38 |
2 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix index babfe90af3520..34e3f5f46dae7 100644 --- a/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix @@ -2,4 +2,5 @@ }: { + mini-graph-card = callPackage ./mini-graph-card {}; } diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/mini-graph-card/default.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/mini-graph-card/default.nix new file mode 100644 index 0000000000000..60942d5f4ed23 --- /dev/null +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/mini-graph-card/default.nix @@ -0,0 +1,38 @@ +{ lib +, buildNpmPackage +, fetchFromGitHub +}: + +buildNpmPackage rec { + pname = "mini-graph-card"; + version = "0.11.0"; + + src = fetchFromGitHub { + owner = "kalkih"; + repo = "mini-graph-card"; + rev = "refs/tags/v${version}"; + hash = "sha256-AC4VawRtWTeHbFqDJ6oQchvUu08b4F3ManiPPXpyGPc="; + }; + + npmDepsHash = "sha256-0ErOTkcCnMqMTsTkVL320SxZaET/izFj9GiNWC2tQtQ="; + + installPhase = '' + runHook preInstall + + mkdir $out + cp -v dist/mini-graph-card-bundle.js $out/ + + runHook postInstall + ''; + + passthru.entrypoint = "mini-graph-card-bundle.js"; + + meta = with lib; { + changelog = "https://github.com/kalkih/mini-graph-card/releases/tag/v${version}"; + description = "Minimalistic graph card for Home Assistant Lovelace UI"; + homepage = "https://github.com/kalkih/mini-graph-card"; + maintainers = with maintainers; [ hexa ]; + license = licenses.mit; + }; +} + |