diff --git a/packages/teslamate-grafana-dashboards/default.nix b/packages/teslamate-grafana-dashboards/default.nix new file mode 100644 index 0000000..2bae7dc --- /dev/null +++ b/packages/teslamate-grafana-dashboards/default.nix @@ -0,0 +1,25 @@ +{ + stdenv, + lib, + fetchFromGitHub, + ... +}: +stdenv.mkDerivation rec { + pname = "teslamate-grafana-dashboards"; + version = "1.28.2"; + + src = fetchFromGitHub { + owner = "teslamate-org"; + repo = "teslamate"; + rev = "v${version}"; + hash = "sha256-CH3u6ijzvVdjfTVu06UcyW4NhVQKeUKtC/j+UeDELNc="; + }; + + dontBuild = true; + + installPhase = '' + mkdir -p "$out" + cp "$src"/grafana/dashboards.yml "$out" + cp -r "$src"/grafana/dashboards "$out" + ''; +}