File tree Expand file tree Collapse file tree 1 file changed +60
-0
lines changed
pkgs/servers/home-assistant/custom-lovelace-modules/plotly-chart-card Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ lib ,
3+ buildNpmPackage ,
4+ buildGoModule ,
5+ fetchFromGitHub ,
6+ } :
7+
8+ let
9+ # The node build requires its pinned esbuild version
10+ esbuild = buildGoModule rec {
11+ pname = "esbuild" ;
12+ version = "0.16.10" ;
13+
14+ src = fetchFromGitHub {
15+ owner = "evanw" ;
16+ repo = "esbuild" ;
17+ tag = "v${ version } " ;
18+ hash = "sha256-plcI3p/m1tPODZNcBoP/kc3avO11oXww7NIA9wdX+Pc=" ;
19+ } ;
20+
21+ vendorHash = "sha256-+BfxCyg0KkDQpHt/wycy/8CTG6YBA/VJvJFhhzUnSiQ=" ;
22+
23+ meta . mainProgram = "esbuild" ;
24+ } ;
25+ in
26+
27+ buildNpmPackage rec {
28+ pname = "plotly-graph-card" ;
29+ version = "3.3.5" ;
30+
31+ src = fetchFromGitHub {
32+ owner = "dbuezas" ;
33+ repo = "lovelace-plotly-graph-card" ;
34+ tag = "v${ version } " ;
35+ hash = "sha256-I0lP0Z0tUiuJ4cC2Ud4uePS8zEZIBNP5X3EEa9ZVQ24=" ;
36+ } ;
37+
38+ npmDepsHash = "sha256-CwIx5/kAAY+PAjEkJi7/7NpApzFSoIfuIl7zmsaqicE=" ;
39+
40+ # for ml-regression-logarithmic
41+ forceGitDeps = true ;
42+ makeCacheWritable = true ;
43+
44+ # custom pinned esbuild version
45+ env . ESBUILD_BINARY_PATH = lib . getExe esbuild ;
46+
47+ installPhase = ''
48+ install -d $out
49+ install -m0644 dist/plotly-graph-card.js $out/
50+ '' ;
51+
52+ meta = {
53+ description = "Highly customisable Lovelace card to plot interactive graphs. Brings scrolling, zooming, and much more" ;
54+ homepage = "https://github.com/dbuezas/lovelace-plotly-graph-card" ;
55+ changelog = "https://github.com/dbuezas/lovelace-plotly-graph-card/releases/tag/${ src . tag } " ;
56+ license = lib . licenses . isc ;
57+ maintainers = with lib . maintainers ; [ hexa ] ;
58+ platforms = lib . platforms . all ;
59+ } ;
60+ }
You can’t perform that action at this time.
0 commit comments